Using one-step ahead prediction to determine battery power setpoints

ABSTRACT

A predictive power control system includes a battery configured to store and discharge electric power, a battery power inverter configured to control an amount of the electric power stored or discharged from the battery, and a controller. The controller is configured to predict a power output of a photovoltaic field and use the predicted power output of the photovoltaic field to determine a setpoint for the battery power inverter.

CROSS-REFERENCE TO RELATED PATENT APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.15/247,873 filed Aug. 25, 2016, now U.S. Pat. No. 10,700,541, whichclaims the benefit of and priority to U.S. Provisional PatentApplication No. 62/239,231, U.S. Provisional Patent Application No.62/239,233, U.S. Provisional Patent Application No. 62/239,245, U.S.Provisional Patent Application No. 62/239,246, and U.S. ProvisionalPatent Application No. 62/239,249, each of which has a filing date ofOct. 8, 2015. The entire disclosure of each of these patent applicationsis incorporated by reference herein.

BACKGROUND

The present disclosure relates generally to renewable energy systemssuch as photovoltaic power systems, wind power systems, hydroelectricpower systems, and other power systems that generate power usingrenewable energy sources. More specifically, the present descriptionrelates to systems and methods for controlling ramp rate and frequencyregulation in a renewable energy system.

Increased concerns about environmental issues such as global warminghave prompted an increased interest in alternate clean and renewablesources of energy. Such sources include solar and wind power. One methodfor harvesting solar energy is using a photovoltaic (PV) field whichprovides power to an energy grid supplying regional power.

Availability of solar power depends on the time of day (sunrise andsunsets) and weather variables such as cloud cover. The power output ofa PV field can be intermittent and may vary abruptly throughout thecourse of a day. For example, a down-ramp (i.e., a negative change) inPV output power may occur when a cloud passes over a PV field. Anup-ramp (i.e., a positive change) in PV output power may occur atsunrise and at any time during the day when a cloudy sky above the PVfield clears up. This intermittency in PV power output presents aproblem to the stability of the energy grid. In order to address theintermittency of PV output power, ramp rate control is often used tomaintain the stability of the grid.

Ramp rate control is the process of offsetting PV ramp rates that falloutside of compliance limits determined by the electric power authorityoverseeing the grid. Ramp rate control typically requires the use of anenergy source that allows for offsetting ramp rates by either supplyingadditional power to the grid or consuming more power from the grid.Stationary battery technology can be used for such applications.Stationary battery technology can also be used for frequency regulation,which is the process of maintaining the grid frequency at a desiredvalue (e.g. 60 Hz in the United States) by adding or removing energyfrom the grid as needed. However, it is difficult and challenging toimplement both ramp rate control and frequency regulationsimultaneously.

Ramp rate control and frequency regulation both impact the rate at whichenergy is provided to or removed from the energy grid. However, ramprate control and frequency regulation often have conflicting objectives(i.e., controlling PV ramp rates vs. regulating grid frequency) whichincreases the difficulty of using the same battery for ramp rate controland frequency regulation simultaneously. Additionally, conventional ramprate control and frequency regulation techniques can result in prematuredegradation of battery assets and often fail to maintain thestate-of-charge of the battery within an acceptable range. It would bedesirable to provide solutions to these and other disadvantages ofconventional ramp rate control and frequency regulation techniques.

SUMMARY

One implementation of the present disclosure is a predictive powercontrol system including a battery configured to store and dischargeelectric power, a battery power inverter configured to control an amountof the electric power stored or discharged from the battery, and acontroller. The controller is configured to predict a power output of aphotovoltaic field and use the predicted power output of thephotovoltaic field to determine a setpoint for the battery powerinverter.

In some embodiments, the controller may be configured to determine thesetpoint for the battery power inverter in order to comply with a ramprate limit.

In some embodiments, the controller may be configured to determine acurrent state-of-charge of the battery and use the currentstate-of-charge of the battery to determine the setpoint for the batterypower inverter.

In some embodiments, the controller may be configured to predict thepower output of the photovoltaic field. The controller may generate astate-space model that represents the power output of the photovoltaicfield. The controller may identify parameters of the state-space modelusing an autoregressive moving average technique based on a history ofvalues of the power output of the photovoltaic field. The controller mayuse a Kalman filter in combination with the identified state-space modelto predict the power output of the photovoltaic field at a next instantin time.

In some embodiments, the controller may be configured to use thepredicted power output of the photovoltaic field to determine that aportion of the power output of the photovoltaic field must be stored orlimited in order to comply with a ramp rate limit. The controller may beconfigured to determine whether a current state-of-charge of the batteryis above or below a state-of-charge setpoint for the battery. Thecontroller may be configured to generate a ramp rate control powersetpoint based on whether the current state-of-charge of the battery isabove or below the state-of-charge setpoint. The ramp rate control powersetpoint may indicate an amount of power to store in the battery inorder to comply with the ramp rate limit.

In some embodiments, the controller may be configured to determine thatthe current state-of-charge of the battery is below the state-of-chargesetpoint. The controller can generate the ramp rate control powersetpoint based on an amount by which the state-of-charge setpointexceeds the current state-of-charge of the battery.

In some embodiments, the controller may be configured to determine thatthe current state-of-charge of the battery is above the state-of-chargesetpoint or within a range of values defined by an upper setpoint limitand a lower setpoint limit. The controller can determine a minimumamount of power required to be stored in the battery in order to complywith the ramp rate limit. The controller can generate the ramp ratecontrol power setpoint by setting the ramp rate control power setpointto the determined minimum amount of power to be stored in the battery inorder to comply with the ramp rate limit.

Another implementation of the present disclosure is a power controlsystem. The system includes a battery configured to store and dischargeelectric power, a battery power inverter configured to control an amountof the electric power stored or discharged from the battery, aphotovoltaic power inverter configured to control an electric poweroutput of a photovoltaic field, and a controller. The controller isconfigured to determine a state-of-charge of the battery, determine aramp state of the electric power output of the photovoltaic field, andgenerate a setpoint for the battery power inverter and a setpoint forthe photovoltaic power inverter. The setpoint for the photovoltaic powerinverter is based on the determined state-of-charge and the determinedramp state.

In some embodiments, the controller may be configured to determine theramp state by determining whether the power output of the photovoltaicfield is ramping-up at a rate that exceeds a ramp rate limit,ramping-down at a rate that exceeds the ramp rate limit, or ramping at arate that does not exceed the ramp rate limit.

In some embodiments, the controller may be configured to set thesetpoint for the battery power inverter to zero and control a ramp rateof the power control system by adjusting the setpoint for thephotovoltaic power inverter. This may be done in response to adetermination that the electric power output is ramping-up at a ratethat exceeds the ramp rate limit

In some embodiments, the controller may be configured to set thesetpoint for the battery power inverter to zero and control a ramp rateof the power control system by adjusting the setpoint for thephotovoltaic power inverter. This may be done in response to adetermination that the state-of-charge of the battery is a chargedstate.

In some embodiments, the controller may be configured to cause thebattery power inverter to charge the battery in response to adetermination that the state-of-charge of the battery is below astate-of-charge setpoint. The controller may be configured to cause thebattery power inverter to discharge the battery in response to adetermination that the state-of-charge of the battery is above thestate-of-charge setpoint.

In some embodiments, the controller may be configured to determine thatthe current state-of-charge of the battery is below a state-of-chargesetpoint or within a range of values defined by an upper setpoint limitand a lower setpoint limit. The controller may be configured todetermine a minimum amount of power required to be discharged from thebattery in order to comply with a ramp rate limit. The controller may beconfigured to generate the setpoint for the battery power inverter bysetting the setpoint for the battery power inverter to the determinedminimum amount of power to be discharged from the battery in order tocomply with the ramp rate limit.

Another implementation of the present disclosure is a method foroperating a battery power inverter. The method includes predicting apower output of a photovoltaic field, determining a setpoint for thebattery power inverter using the predicted power output of thephotovoltaic field, and using the determined setpoint for the batterypower inverter to control an amount of electric power stored ordischarged from the battery by the battery power inverter.

In some embodiments, determining the setpoint for the battery powerinverter may include generating the setpoint to ensure compliance with aramp rate limit.

In some embodiments, the method may further include determining acurrent state-of-charge of the battery and using the currentstate-of-charge of the battery to determine the setpoint for the batterypower inverter.

In some embodiments, predicting the power output of the photovoltaicfield may include generating a state-space model that represents thepower output of the photovoltaic field. The method may includeidentifying parameters of the state-space model using an autoregressivemoving average technique based on a history of values of the poweroutput of the photovoltaic field. The method may include using a Kalmanfilter in combination with the identified state-space model to predictthe power output of the photovoltaic field at a next instant in time.

In some embodiments the method may further include using the predictedpower output of the photovoltaic field to determine that a portion ofthe power output of the photovoltaic field must be stored or limited inorder to comply with a ramp rate limit. The method may includedetermining whether a current state-of-charge of the battery is above orbelow a state-of-charge setpoint for the battery. The method may includegenerating a ramp rate control power setpoint based on whether thecurrent state-of-charge of the battery is above or below thestate-of-charge setpoint, the ramp rate control power setpointindicating an amount of power to store in the battery in order to complywith the ramp rate limit.

In some embodiments, determining whether a current state-of-charge ofthe battery is above or below a state-of-charge setpoint for the batteryincludes determining that the current state-of-charge of the battery isbelow the state-of-charge setpoint. The embodiment may includegenerating the ramp rate control power setpoint comprises generating theramp rate control power setpoint based on an amount by which thestate-of-charge setpoint exceeds the current state-of-charge of thebattery.

In some embodiments, determining whether a current state-of-charge ofthe battery is above or below a state-of-charge setpoint for the batterymay include determining that the current state-of-charge of the batteryis above the state-of-charge setpoint or within a range of valuesdefined by an upper setpoint limit and a lower setpoint limit. Themethod may include generating the ramp rate control power setpoint.Generating the ramp rate control power setpoints may include determininga minimum amount of power required to be stored in the battery in orderto comply with the ramp rate limit and setting the ramp rate controlpower setpoint to the determined minimum amount of power to be stored inthe battery in order to comply with the ramp rate limit.

Those skilled in the art will appreciate that the summary isillustrative only and is not intended to be in any way limiting. Otheraspects, inventive features, and advantages of the devices and/orprocesses described herein, as defined solely by the claims, will becomeapparent in the detailed description set forth herein and taken inconjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a photovoltaic (PV) energy systemconfigured to perform ramp rate control, according to an exemplaryembodiment.

FIG. 2 is a graph illustrating the variability of the power output ofthe PV field of FIG. 1, according to an exemplary embodiment.

FIG. 3A is a block diagram of an electrical energy storage systemconfigured to simultaneously perform both ramp rate control andfrequency regulation while maintaining the state-of-charge of thebattery within a desired range, according to an exemplary embodiment.

FIG. 3B is a drawing of the electrical energy storage system of FIG. 3A.

FIG. 4 is a drawing illustrating the electric supply to an energy gridand electric demand from the energy grid which must be balanced in orderto maintain the grid frequency, according to an exemplary embodiment.

FIG. 5 is a block diagram illustrating the controller of FIG. 3A ingreater detail, according to an exemplary embodiment.

FIG. 6 is a timeline illustrating a one-step-ahead prediction of the PVpower output which may be used by the controller of FIG. 3A to generatebattery power setpoints and PV power setpoints, according to anexemplary embodiment.

FIG. 7 is a graph illustrating a frequency regulation control law whichmay be used by the controller of FIG. 3A to generate a frequencyregulation power setpoint, according to an exemplary embodiment.

FIG. 8 is a flowchart of a process for generating ramp rate powersetpoints which may be performed by the controller of FIG. 3A, accordingto an exemplary embodiment.

FIGS. 9A-9D are flowcharts of another process for generating ramp ratepower setpoints which may be performed by the controller of FIG. 3A,according to an exemplary embodiment.

FIG. 10 is a flowchart of a process for generating battery powersetpoints and PV power setpoints which may be performed by thecontroller of FIG. 3A, according to an exemplary embodiment.

FIG. 11 is a graph illustrating a reactive ramp rate control techniquewhich can be used by the electrical energy storage system of FIGS.3A-3B, according to an exemplary embodiment.

FIG. 12 is a graph illustrating a preemptive ramp rate control techniquewhich can be used by the electrical energy storage system of FIGS.3A-3B, according to an exemplary embodiment.

FIG. 13 is a block diagram of a frequency response optimization system,according to an exemplary embodiment.

FIG. 14 is a graph of a regulation signal which may be provided to thefrequency response optimization system of FIG. 13 and a frequencyresponse signal which may be generated by frequency responseoptimization system of FIG. 13, according to an exemplary embodiment.

FIG. 15 is a block diagram of a frequency response controller which canbe used to monitor and control the frequency response optimizationsystem of FIG. 13, according to an exemplary embodiment.

FIG. 16 is a block diagram of a high level controller which can be usedin the frequency response optimization system of FIG. 13, according toan exemplary embodiment.

FIG. 17 is a block diagram of a low level controller which can be usedin the frequency response optimization system of FIG. 13, according toan exemplary embodiment.

FIG. 18 is a block diagram of a frequency response control system,according to an exemplary embodiment.

FIG. 19 is a block diagram illustrating data flow into a data fusionmodule of the frequency response control system of FIG. 18, according toan exemplary embodiment.

FIG. 20 is a block diagram illustrating a database schema which can beused in the frequency response control system of FIG. 18, according toan exemplary embodiment.

DETAILED DESCRIPTION

Referring generally to the FIGURES, systems and methods for controllingramp rate and frequency regulation in a photovoltaic (PV) energy systemare shown, according to various exemplary embodiments. An asset such asa stationary battery can be used for several applications, two of whichare ramp rate control and frequency regulation. Ramp rate control is theprocess of offsetting PV ramp rates (i.e., increases or decreases in PVpower output) that fall outside of compliance limits determined by theelectric power authority overseeing the energy grid. Ramp rate controltypically requires the use of an energy source that allows foroffsetting ramp rates by either supplying additional power to the gridor consuming more power from the grid. Frequency regulation is theprocess of maintaining the grid frequency at a desired value (e.g. 60 Hzin the United States) by adding or removing energy from the grid asneeded.

A frequency regulation and ramp rate controller in accordance with thepresent invention simultaneously controls the ramp rate of the PV powerand sets the battery setpoint to a value for the purpose of frequencyregulation. Furthermore, the controller maintains the state-of-charge ofthe battery within a desirable range (e.g., a state-of-charge setpoint±atolerance) in order to avoid the depletion of the battery and/oraffecting its health. The controller is configured to determine asetpoint for a battery power inverter and a setpoint for a PV powerinverter such that the PV ramp rate remains within compliance, thefrequency of the energy grid is regulated, and the state-of-charge ofthe battery is maintained.

In some embodiments, the controller uses one-step ahead prediction ofthe PV power in order to determine the amount of battery power needed tocontrol the PV ramp rate. The controller may use the uncertainty in thePV prediction to statistically determine the minimum and maximum amountof battery power required for the ramp rate of the PV power to stay incompliance. The controller may then determine the total battery powerrequired at any instant based on that required for frequency regulation,the state-of-charge of the battery, the power needed for ramp ratecontrol, and the nature of the ramp rate event. If the PV power outputis experiencing an up-ramp and the current stage-of-charge of thebattery is within the desired range, the PV power inverter may be usedto control the PV ramp rate rather than charging the battery. Additionalfeatures and advantages of the present invention are described ingreater detail below.

Photovoltaic Energy System with Ramp Rate Control

Referring now to FIG. 1, a photovoltaic energy system 100 is shown,according to an exemplary embodiment. In brief overview, system 100converts solar energy into electricity using solar panels or othermaterials that exhibit the photovoltaic effect. The electricitygenerated by system 100 may be used locally by system 100 (e.g., used topower components of system 100), provided to a building or campusconnected to system 100, supplied to a regional energy grid, and/orstored in a battery. System 100 may use battery storage to perform loadshifting and/or ramp rate control. Battery storage can also be used toperform frequency regulation. A photovoltaic energy system 300 that usesbattery storage to simultaneously perform both ramp rate control andfrequency regulation is described in greater detail with reference toFIGS. 3A-8.

System 100 is shown to include a photovoltaic (PV) field 102, a PV fieldpower inverter 104, a battery 106, a battery power inverter 108, a pointof interconnection (POI) 110, and an energy grid 112. PV field 102 mayinclude a collection of photovoltaic cells. The photovoltaic cells areconfigured to convert solar energy (i.e., sunlight) into electricityusing a photovoltaic material such as monocrystalline silicon,polycrystalline silicon, amorphous silicon, cadmium telluride, copperindium gallium selenide/sulfide, or other materials that exhibit thephotovoltaic effect. In some embodiments, the photovoltaic cells arecontained within packaged assemblies that form solar panels. Each solarpanel may include a plurality of linked photovoltaic cells. The solarpanels may combine to form a photovoltaic array.

PV field 102 may have any of a variety of sizes and/or locations. Insome embodiments, PV field 102 is part of a large-scale photovoltaicpower station (e.g., a solar park or farm) capable of providing anenergy supply to a large number of consumers. When implemented as partof a large-scale system, PV field 102 may cover multiple hectares andmay have power outputs of tens or hundreds of megawatts. In otherembodiments, PV field 102 may cover a smaller area and may have arelatively lesser power output (e.g., between one and ten megawatts,less than one megawatt, etc.). For example, PV field 102 may be part ofa rooftop-mounted system capable of providing enough electricity topower a single home or building. It is contemplated that PV field 102may have any size, scale, and/or power output, as may be desirable indifferent implementations.

PV field 102 may generate a direct current (DC) output that depends onthe intensity and/or directness of the sunlight to which the solarpanels are exposed. The directness of the sunlight may depend on theangle of incidence of the sunlight relative to the surfaces of the solarpanels. The intensity of the sunlight may be affected by a variety ofenvironmental factors such as the time of day (e.g., sunrises andsunsets) and weather variables such as clouds that cast shadows upon PVfield 102. For example, FIG. 1 is shown to include a cloud 114 thatcasts a shadow 116 on PV field 102 as cloud 114 passes over PV field102. When PV field 102 is partially or completely covered by shadow 116,the power output of PV field 102 (i.e., PV field power P_(PV)) may dropas a result of the decrease in solar intensity. The variability of thePV field power output P_(PV) is described in greater detail withreference to FIG. 2.

In some embodiments, PV field 102 is configured to maximize solar energycollection. For example, PV field 102 may include a solar tracker (e.g.,a GPS tracker, a sunlight sensor, etc.) that adjusts the angle of thesolar panels so that the solar panels are aimed directly at the sunthroughout the day. The solar tracker may allow the solar panels toreceive direct sunlight for a greater portion of the day and mayincrease the total amount of power produced by PV field 102. In someembodiments, PV field 102 includes a collection of mirrors, lenses, orsolar concentrators configured to direct and/or concentrate sunlight onthe solar panels. The energy generated by PV field 102 may be stored inbattery 106 or provided to energy grid 112.

Still referring to FIG. 1, system 100 is shown to include a PV fieldpower inverter 104. Power inverter 104 may be configured to convert theDC output of PV field 102 P_(PV) into an alternating current (AC) outputthat can be fed into energy grid 112 or used by a local (e.g., off-grid)electrical network. For example, power inverter 104 may be a solarinverter or grid-tie inverter configured to convert the DC output fromPV field 102 into a sinusoidal AC output synchronized to the gridfrequency of energy grid 112. In some embodiments, power inverter 104receives a cumulative DC output from PV field 102. For example, powerinverter 104 may be a string inverter or a central inverter. In otherembodiments, power inverter 104 may include a collection ofmicro-inverters connected to each solar panel or solar cell.

Power inverter 104 may receive the DC power output P_(PV) from PV field102 and convert the DC power output to an AC power output that can befed into energy grid 112. Power inverter 104 may synchronize thefrequency of the AC power output with that of energy grid 112 (e.g., 50Hz or 60 Hz) using a local oscillator and may limit the voltage of theAC power output to no higher than the grid voltage. In some embodiments,power inverter 104 is a resonant inverter that includes or uses LCcircuits to remove the harmonics from a simple square wave in order toachieve a sine wave matching the frequency of energy grid 112. Invarious embodiments, power inverter 104 may operate using high-frequencytransformers, low-frequency transformers, or without transformers.Low-frequency transformers may convert the DC output from PV field 102directly to the AC output provided to energy grid 112. High-frequencytransformers may employ a multi-step process that involves convertingthe DC output to high-frequency AC, then back to DC, and then finally tothe AC output provided to energy grid 112.

Power inverter 104 may be configured to perform maximum power pointtracking and/or anti-islanding. Maximum power point tracking may allowpower inverter 104 to produce the maximum possible AC power from PVfield 102. For example, power inverter 104 may sample the DC poweroutput from PV field 102 and apply a variable resistance to find theoptimum maximum power point. Anti-islanding is a protection mechanismthat immediately shuts down power inverter 104 (i.e., preventing powerinverter 104 from generating AC power) when the connection to anelectricity-consuming load no longer exists. In some embodiments, PVfield power inverter 104 performs ramp rate control by limiting thepower generated by PV field 102.

Still referring to FIG. 1, system 100 is shown to include a batterypower inverter 108. In some embodiments, battery power inverter 108 is abidirectional power inverter configured to control the poweroutput/input of battery 106 (i.e., battery power P_(bat)). In otherwords, battery power inverter 108 controls the rate at which battery 106charges or discharges stored electricity. The battery power P_(bat) maybe positive if battery power inverter 108 is drawing power from battery106 or negative if battery power inverter 108 is storing power inbattery 106.

Battery power inverter 108 may include some or all of the features of PVfield power inverter 104. For example, battery power inverter 108 may beconfigured to receive a DC power output from battery 106 and convert theDC power output into an AC power output that can be fed into energy grid112 (e.g., via POI 110). Battery power inverter 108 may also beconfigured to convert AC power from POI 110 into DC power that can bestored in battery 106. As such, battery power inverter 104 can functionas both a power inverter and a rectifier to convert between DC and AC ineither direction. The power outputs from PV field power inverter 104 andbattery power inverter 108 combine at POI 110 to form the power outputP_(POI) provided to energy grid 112 (e.g., P_(POI)=P_(PV)+P_(bat)).P_(POI) may be positive if POI 110 is providing power to energy grid 112or negative if POI 110 is drawing power from energy grid 112.

Referring now to FIG. 2, a graph 200 illustrating the variability of thePV field power output P_(PV) generated by PV field 102 is shown,according to an exemplary embodiment. As shown in graph 200, the PVfield power output P_(PV) may be intermittent and can vary abruptlythroughout the course of a day. For example, if a cloud passes over PVfield 102, power output P_(PV) may rapidly and temporarily drop while PVfield 102 is within the cloud's shadow. This intermittency in PV poweroutput P_(PV) presents a problem to the stability of energy grid 112.System 100 uses ramp rate control to maintain the stability of energygrid 112 in the presence of a variable PV power output P_(PV).

In system 100, ramp rate is defined as the time rate of change of thepower output P_(POI) provided to energy grid 112 (i.e., the power at POI110). The power output P_(POI) may vary depending on the magnitude ofthe DC output P_(PV) provided by PV field 102 and the magnitude of thepower output P_(bat) from battery power inverter 108. System 100 may beconfigured to calculate the ramp rate by sampling power output P_(POI)and determining a change in power output P_(POI) over time. For example,system 100 may calculate the ramp rate as the derivative or slope ofpower output P_(POI) as a function of time, as shown in the followingequations:

${{Ramp}\mspace{14mu} {Rate}} = {{\frac{{dP}_{POI}}{dt}\mspace{14mu} {or}\mspace{14mu} {Ramp}\mspace{14mu} {Rate}} = \frac{\Delta \; P_{POI}}{\Delta \; t}}$

where P_(POI) represents the power provided to energy grid 112 and trepresents time.

In some embodiments, system 100 controls the ramp rate to comply withregulatory requirements or contractual requirements imposed by energygrid 112. For example, photovoltaic energy system 100 may be required tomaintain the ramp rate within a predetermined range in order to deliverpower to energy grid 112. In some embodiments, system 100 is required tomaintain the absolute value of the ramp rate at less than a thresholdvalue (e.g., less than 10% of the rated power capacity per minute). Inother words, system 100 may be required to prevent power output P_(POI)from increasing or decreasing too rapidly. If this requirement is notmet, system 100 may be deemed to be in non-compliance and its capacitymay be de-rated, which directly impacts the revenue generation potentialof system 100.

System 100 may use battery 106 to perform ramp rate control. Forexample, system 100 may use energy from battery 106 to smooth a suddendrop in the PV power output P_(PV) so that the absolute value of theramp rate is less than a threshold value. As previously mentioned, asudden drop in power output P_(PV) may occur when a solar intensitydisturbance occurs, such as a passing cloud blocking the sunlight to PVfield 102. System 100 may use energy from battery 106 to make up thedifference between the power output P_(PV) of PV field 102 (which hassuddenly dropped) and the minimum required power output to comply withramp rate requirements. The energy from battery 106 allows system 100 togradually decrease power output P_(POI) so that the absolute value ofthe ramp rate does not exceed the threshold value.

Once the cloud has passed, the power output P_(PV) may suddenly increaseas the solar intensity returns to its previous value. System 100 mayperform ramp rate control by gradually ramping up power output P_(POI).Ramping up power output P_(POI) may not require energy from battery 106.For example, power inverter 104 may use only a portion of the poweroutput P_(PV) (which has suddenly increased) to generate power outputP_(POI) (i.e., limiting the power output) so that the ramp rate of poweroutput P_(POI) does not exceed the threshold value. The remainder of theenergy generated by PV field 102 (i.e., the excess energy) may be storedin battery 106 and/or dissipated. Limiting the energy generated by PVfield 102 may include diverting or dissipating a portion of the energygenerated by PV field 102 (e.g., using variable resistors or othercircuit elements) so that only a portion of the energy generated by PVfield 102 is provided to energy grid 112. This allows system 100 to rampup power output P_(POI) gradually without exceeding the ramp rate.

Photovoltaic Energy System with Frequency Regulation and Ramp RateControl

Referring now to FIGS. 3A-4, a photovoltaic energy system 300 that usesbattery storage to simultaneously perform both ramp rate control andfrequency regulation is shown, according to an exemplary embodiment.Frequency regulation is the process of maintaining the stability of thegrid frequency (e.g., 60 Hz in the United States). As shown in FIG. 4,the grid frequency may remain balanced at 60 Hz as long as there is abalance between the demand from the energy grid and the supply to theenergy grid. An increase in demand yields a decrease in grid frequency,whereas an increase in supply yields an increase in grid frequency.During a fluctuation of the grid frequency, system 300 may offset thefluctuation by either drawing more energy from the energy grid (e.g., ifthe grid frequency is too high) or by providing energy to the energygrid (e.g., if the grid frequency is too low). Advantageously, system300 may use battery storage in combination with photovoltaic power toperform frequency regulation while simultaneously complying with ramprate requirements and maintaining the state-of-charge of the batterystorage within a predetermined desirable range.

Referring particularly to FIGS. 3A-3B, system 300 is shown to include aphotovoltaic (PV) field 302, a PV field power inverter 304, a battery306, a battery power inverter 308, a point of interconnection (POI) 310,and an energy grid 312. These components may be the same or similar toPV field 102, PV field power inverter 104, battery 106, battery powerinverter 108, POI 110, and energy grid 112, as described with referenceto FIG. 1. For example, PV field 302 may convert solar energy into a DCpower output P_(PV) and provide the DC power output P_(PV) to PV fieldpower inverter 304. PV field power inverter 304 may convert the DC poweroutput P_(PV) into an AC power output u_(PV) and provide the AC poweroutput u_(PV) to POI 310.

In some embodiments, system 300 also includes a controller 314 (shown inFIG. 3A) and/or a building 318 (shown in FIG. 3B). In brief overview, PVfield power inverter 304 can be operated by controller 314 to controlthe power output of PV field 302. Similarly, battery power inverter 308can be operated by controller 314 to control the power input and/orpower output of battery 306. The power outputs of PV field powerinverter 304 and battery power inverter 308 combine at POI 310 to formthe power provided to energy grid 312. In some embodiments, building 318is also connected to POI 310. Building 318 can consume a portion of thecombined power at POI 310 to satisfy the energy requirements of building318.

PV field power inverter 304 can include any of a variety of circuitcomponents (e.g., resistors, capacitors, indictors, transformers,transistors, switches, diodes, etc.) configured to perform the functionsdescribed herein. In some embodiments DC power from PV field 302 isconnected to a transformer of PV field power inverter 304 through acenter tap of a primary winding. A switch can be rapidly switched backand forth to allow current to flow back to PV field 302 following twoalternate paths through one end of the primary winding and then theother. The alternation of the direction of current in the primarywinding of the transformer can produce alternating current (AC) in asecondary circuit.

In some embodiments, PV field power inverter 304 uses anelectromechanical switching device to convert DC power from PV field 302into AC power. The electromechanical switching device can include twostationary contacts and a spring supported moving contact. The springcan hold the movable contact against one of the stationary contacts,whereas an electromagnet can pull the movable contact to the oppositestationary contact. Electric current in the electromagnet can beinterrupted by the action of the switch so that the switch continuallyswitches rapidly back and forth. In some embodiments, PV field powerinverter 304 uses transistors, thyristors (SCRs), and/or various othertypes of semiconductor switches to convert DC power from PV field 302into AC power. SCRs provide large power handling capability in asemiconductor device and can readily be controlled over a variablefiring range.

In some embodiments, PV field power inverter 304 produces a squarevoltage waveform (e.g., when not coupled to an output transformer). Inother embodiments, PV field power inverter 304 produces a sinusoidalwaveform that matches the sinusoidal frequency and voltage of energygrid 312. For example, PV field power inverter 304 can use Fourieranalysis to produce periodic waveforms as the sum of an infinite seriesof sine waves. The sine wave that has the same frequency as the originalwaveform is called the fundamental component. The other sine waves,called harmonics, that are included in the series have frequencies thatare integral multiples of the fundamental frequency.

In some embodiments, PV field power inverter 304 uses inductors and/orcapacitors to filter the output voltage waveform. If PV field powerinverter 304 includes a transformer, filtering can be applied to theprimary or the secondary side of the transformer or to both sides.Low-pass filters can be applied to allow the fundamental component ofthe waveform to pass to the output while limiting the passage of theharmonic components. If PV field power inverter 304 is designed toprovide power at a fixed frequency, a resonant filter can be used. If PVfield power inverter 304 is an adjustable frequency inverter, the filtercan be tuned to a frequency that is above the maximum fundamentalfrequency. In some embodiments, PV field power inverter 304 includesfeedback rectifiers or antiparallel diodes connected acrosssemiconductor switches to provide a path for a peak inductive loadcurrent when the switch is turned off. The antiparallel diodes can besimilar to freewheeling diodes commonly used in AC/DC convertercircuits.

Like PV field power inverter 304, battery power inverter 308 can includeany of a variety of circuit components (e.g., resistors, capacitors,indictors, transformers, transistors, switches, diodes, etc.) configuredto perform the functions described herein. Battery power inverter 308can include many of the same components as PV field power inverter 304and can operate using similar principles. For example, battery powerinverter 308 can use electromechanical switching devices, transistors,thyristors (SCRs), and/or various other types of semiconductor switchesto convert between AC and DC power. Battery power inverter 308 canoperate the circuit components to adjust the amount of power stored inbattery 306 and/or discharged from battery 306 (i.e., power throughput)based on a power control signal or power setpoint from controller 314.

Battery power inverter 308 may be configured to draw a DC power P_(bat)from battery 306, convert the DC power P_(bat) into an AC power u_(bat),and provide the AC power u_(bat) to POI 310. Battery power inverter 308may also be configured to draw the AC power u_(bat) from POI 310,convert the AC power u_(bat) into a DC battery power P_(bat), and storethe DC battery power P_(bat) in battery 306. The DC battery powerP_(bat) may be positive if battery 306 is providing power to batterypower inverter 308 (i.e., if battery 306 is discharging) or negative ifbattery 306 is receiving power from battery power inverter 308 (i.e., ifbattery 306 is charging). Similarly, the AC battery power u_(bat) may bepositive if battery power inverter 308 is providing power to POI 310 ornegative if battery power inverter 308 is receiving power from POI 310.

The AC battery power u_(bat) is shown to include an amount of power usedfor frequency regulation (i.e., u_(FR)) and an amount of power used forramp rate control (i.e., u_(RR)) which together form the AC batterypower (i.e., u_(bat)=u_(FR)+u_(RR)). The DC battery power P_(bat) isshown to include both u_(FR) and u_(RR) as well as an additional termP₁₀ representing power losses in battery 306 and/or battery powerinverter 308 (i.e., P_(bat)=u_(FR)+u_(RR)+P_(loss)). The PV field poweru_(PV) and the battery power u_(bat) combine at POI 110 to form P_(POI)(i.e., P_(POI)=u_(PV)+u_(bat)), which represents the amount of powerprovided to energy grid 312. P_(POI) may be positive if POI 310 isproviding power to energy grid 312 or negative if POI 310 is receivingpower from energy grid 312.

Still referring to FIG. 3A, system 300 is shown to include a controller314. Controller 314 may be configured to generate a PV power setpointu_(PV) for PV field power inverter 304 and a battery power setpointu_(bat) for battery power inverter 308. Throughout this disclosure, thevariable u_(PV) is used to refer to both the PV power setpoint generatedby controller 314 and the AC power output of PV field power inverter 304since both quantities have the same value. Similarly, the variableu_(bat) is used to refer to both the battery power setpoint generated bycontroller 314 and the AC power output/input of battery power inverter308 since both quantities have the same value.

PV field power inverter 304 uses the PV power setpoint u_(PV) to controlan amount of the PV field power P_(PV) to provide to POI 110. Themagnitude of u_(PV) may be the same as the magnitude of P_(PV) or lessthan the magnitude of P_(PV). For example, u_(PV) may be the same asP_(PV) if controller 314 determines that PV field power inverter 304 isto provide all of the photovoltaic power P_(PV) to POI 310. However,u_(PV) may be less than P_(PV) if controller 314 determines that PVfield power inverter 304 is to provide less than all of the photovoltaicpower P_(PV) to POI 310. For example, controller 314 may determine thatit is desirable for PV field power inverter 304 to provide less than allof the photovoltaic power P_(PV) to POI 310 to prevent the ramp ratefrom being exceeded and/or to prevent the power at POI 310 fromexceeding a power limit.

Battery power inverter 308 uses the battery power setpoint u_(bat) tocontrol an amount of power charged or discharged by battery 306. Thebattery power setpoint u_(bat) may be positive if controller 314determines that battery power inverter 308 is to draw power from battery306 or negative if controller 314 determines that battery power inverter308 is to store power in battery 306. The magnitude of u_(bat) controlsthe rate at which energy is charged or discharged by battery 306.

Controller 314 may generate u_(PV) and u_(bat) based on a variety ofdifferent variables including, for example, a power signal from PV field302 (e.g., current and previous values for P_(PV)), the currentstate-of-charge (SOC) of battery 306, a maximum battery power limit, amaximum power limit at POI 310, the ramp rate limit, the grid frequencyof energy grid 312, and/or other variables that can be used bycontroller 314 to perform ramp rate control and/or frequency regulation.Advantageously, controller 314 generates values for u_(PV) and u_(bat)that maintain the ramp rate of the PV power within the ramp ratecompliance limit while participating in the regulation of grid frequencyand maintaining the SOC of battery 306 within a predetermined desirablerange. Controller 314 is described in greater detail with reference toFIGS. 5-7. Exemplary processes which may be performed by controller 314to generate the PV power setpoint u_(PV) and the battery power setpointu_(bat) are described with reference to FIGS. 8-10.

Reactive Ramp Rate Control

Controller 314 may be configured to control a ramp rate of the poweroutput 316 provided to energy grid 312. Ramp rate may be defined as thetime rate of change of power output 316. Power output 316 may varydepending on the magnitude of the DC output provided by PV field 302.For example, if a cloud passes over PV field 302, power output 316 mayrapidly and temporarily drop while PV field 302 is within the cloud'sshadow. Controller 314 may be configured to calculate the ramp rate bysampling power output 316 and determining a change in power output 316over time. For example, controller 314 may calculate the ramp rate asthe derivative or slope of power output 316 as a function of time, asshown in the following equations:

${{Ramp}\mspace{14mu} {Rate}} = {{\frac{dP}{dt}\mspace{14mu} {or}\mspace{14mu} {Ramp}\mspace{14mu} {Rate}} = \frac{\Delta \; P}{\Delta \; t}}$

where P represents power output 316 and t represents time.

In some embodiments, controller 314 controls the ramp rate to complywith regulatory requirements or contractual requirements imposed byenergy grid 312. For example, system 300 may be required to maintain theramp rate within a predetermined range in order to deliver power toenergy grid 312. In some embodiments, system 300 is required to maintainthe absolute value of the ramp rate at less than a threshold value(e.g., less than 10% of the rated power capacity per minute). In otherwords, system 300 may be required to prevent power output 316 fromincreasing or decreasing too rapidly. If this requirement is not met,system 300 may be deemed to be in non-compliance and its capacity may bede-rated, which directly impacts the revenue generation potential ofsystem 300.

Controller 314 may use battery 306 to perform ramp rate control. Forexample, controller 314 may use energy from battery 306 to smooth asudden drop in power output 316 so that the absolute value of the ramprate is less than a threshold value. As previously mentioned, a suddendrop in power output 316 may occur when a solar intensity disturbanceoccurs, such as a passing cloud blocking the sunlight to PV field 302.Controller 314 may use the energy from battery 306 to make up thedifference between the power provided by PV field 302 (which hassuddenly dropped) and the minimum required power output 316 to maintainthe required ramp rate. The energy from battery 306 allows controller314 to gradually decrease power output 316 so that the absolute value ofthe ramp rate does not exceed the threshold value.

Once the cloud has passed, the power output from PV field 302 maysuddenly increase as the solar intensity returns to its previous value.Controller 314 may perform ramp rate control by gradually ramping uppower output 316. Ramping up power output 316 may not require energyfrom battery 306. For example, power inverter 304 may use only a portionof the energy generated by PV field 302 (which has suddenly increased)to generate power output 316 (i.e., limiting the power output) so thatthe ramp rate of power output 316 does not exceed the threshold value.The remainder of the energy generated by PV field 302 (i.e., the excessenergy) may be stored in battery 306 and/or dissipated. Limiting theenergy generated by PV field 302 may include diverting or dissipating aportion of the energy generated by PV field 302 (e.g., using variableresistors or other circuit elements) so that only a portion of theenergy generated by PV field 302 is provided to energy grid 312. Thisallows power inverter 304 to ramp up power output 316 gradually withoutexceeding the ramp rate. The excess energy may be stored in battery 306,used to power other components of system 300, or dissipated.

Referring now to FIG. 11, a graph 1100 illustrating a reactive ramp ratecontrol technique which can be used by system 300 is shown, according toan exemplary embodiment. Graph 1100 plots the power output P provided toenergy grid 312 as a function of time t. The solid line 1102 illustratespower output P without any ramp rate control, whereas the broken line1104 illustrates power output P with ramp rate control.

Between times t₀ and t₁, power output P is at a high value P_(high). Attime t₁, a cloud begins to cast its shadow on PV field 302, causing thepower output of PV field 302 to suddenly decrease, until PV field 302 iscompletely in shadow at time t₂. Without any ramp rate control, thesudden drop in power output from PV field 302 causes the power output Pto rapidly drop to a low value P_(low) at time t₂. However, with ramprate control, system 300 uses energy from battery 306 to graduallydecrease power output P to P_(low) at time t₃. Triangular region 1106represents the energy from battery 306 used to gradually decrease poweroutput P.

Between times t₂ and t₄, PV field 302 is completely in shadow. At timet₄, the shadow cast by the cloud begins to move off PV field 302,causing the power output of PV field 302 to suddenly increase, until PVfield 302 is entirely in sunlight at time t₅. Without any ramp ratecontrol, the sudden increase in power output from PV field 302 causesthe power output P to rapidly increase to the high value P_(high) attime t₅. However, with ramp rate control, power inverter 304 limits theenergy from PV field 302 to gradually increase power output P toP_(high) at time t₆. Triangular region 1108 represents the energygenerated by PV field 302 in excess of the ramp rate limit. The excessenergy may be stored in battery 306 and/or dissipated in order togradually increase power output P at a rate no greater than the maximumallowable ramp rate.

Notably, both triangular regions 1106 and 1108 begin after a change inthe power output of PV field 302 occurs. As such, both the decreasingramp rate control and the increasing ramp rate control provided bysystem 300 are reactionary processes triggered by a detected change inthe power output. In some embodiments, a feedback control technique isused to perform ramp rate control in system 300. For example, controller314 may monitor power output 316 and determine the absolute value of thetime rate of change of power output 316 (e.g., dP/dt or ΔP/Δt).Controller 314 may initiate ramp rate control when the absolute value ofthe time rate of change of power output 316 exceeds a threshold value.

Preemptive Ramp Rate Control

In some embodiments, controller 314 is configured to predict when solarintensity disturbances will occur and may cause power inverter 304 toramp down the power output 316 provided to energy grid 312 preemptively.Instead of reacting to solar intensity disturbances after they occur,controller 314 can actively predict solar intensity disturbances andpreemptively ramp down power output 316 before the disturbances affectPV field 302. Advantageously, this allows system controller 314 toperform both ramp down control and ramp up control by using only aportion of the energy provided by PV field 302 to generate power output316 while the power output of PV field 302 is still high, rather thanrelying on energy from a battery. The remainder of the energy generatedby PV field 302 (i.e., the excess energy) may be stored in battery 306and/or dissipated.

In some embodiments, controller 314 predicts solar intensitydisturbances using input from one or more cloud detectors. The clouddetectors may include an array of solar intensity sensors. The solarintensity sensors may be positioned outside PV field 302 or within PVfield 302. Each solar intensity sensor may have a known location. Insome embodiments, the locations of the solar intensity sensors are basedon the geometry and orientation of PV field 302. For example, if PVfield 302 is rectangular, more sensors may be placed along its long sidethan along its short side. A cloud formation moving perpendicular to thelong side may cover more area of PV field 302 per unit time than a cloudformation moving perpendicular to the short side. Therefore, it may bedesirable to include more sensors along the long side to more preciselydetect cloud movement perpendicular to the long side. As anotherexample, more sensors may be placed along the west side of PV field 302than along the east side of PV field 302 since cloud movement from westto east is more common than cloud movement from east to west. Theplacement of sensors may be selected to detect approaching cloudformations without requiring unnecessary or redundant sensors.

The solar intensity sensors may be configured to measure solar intensityat various locations outside PV field 302. When the solar intensitymeasured by a particular solar intensity sensor drops below a thresholdvalue, controller 314 may determine that a cloud is currently casting ashadow on the solar intensity sensor. Controller 314 may use input frommultiple solar intensity sensors to determine various attributes ofclouds approaching PV field 302 and/or the shadows produced by suchclouds. For example, if a shadow is cast upon two or more of the solarintensity sensors sequentially, controller 314 may use the knownpositions of the solar intensity sensors and the time interval betweeneach solar intensity sensor detecting the shadow to determine how fastthe cloud/shadow is moving. If two or more of the solar intensitysensors are within the shadow simultaneously, controller 314 may use theknown positions of the solar intensity sensors to determine a position,size, and/or shape of the cloud/shadow.

Although the cloud detectors are described primarily as solar intensitysensors, it is contemplated that the cloud detectors may include anytype of device configured to detect the presence of clouds or shadowscast by clouds. For example, the cloud detectors may include one or morecameras that capture visual images of cloud movement. The cameras may beupward-oriented cameras located below the clouds (e.g., attached to astructure on the Earth) or downward-oriented cameras located above theclouds (e.g., satellite cameras). Images from the cameras may be used todetermine cloud size, position, velocity, and/or other cloud attributes.In some embodiments, the cloud detectors include radar or othermeteorological devices configured to detect the presence of clouds,cloud density, cloud velocity, and/or other cloud attributes. In someembodiments, controller 314 receives data from a weather service thatindicates various cloud attributes.

Advantageously, controller 314 may use the attributes of theclouds/shadows to determine when a solar intensity disturbance (e.g., ashadow) is approaching PV field 302. For example, controller 314 may usethe attributes of the clouds/shadows to determine whether any of theclouds are expected to cast a shadow upon PV field 302. If a cloud isexpected to cast a shadow upon PV field 302, controller 314 may use thesize, position, and/or velocity of the cloud/shadow to determine aportion of PV field 302 that will be affected. The affected portion ofPV field 302 may include some or all of PV field 302. Controller 314 mayuse the attributes of the clouds/shadows to quantify a magnitude of theexpected solar intensity disturbance (e.g., an expected decrease inpower output from PV field 302) and to determine a time at which thedisturbance is expected to occur (e.g., a start time, an end time, aduration, etc.).

In some embodiments, controller 314 predicts a magnitude of thedisturbance for each of a plurality of time steps. Controller 314 mayuse the predicted magnitudes of the disturbance at each of the timesteps to generate a predicted disturbance profile. The predicteddisturbance profile may indicate how fast power output 316 is expectedto change as a result of the disturbance. Controller 314 may compare theexpected rate of change to a ramp rate threshold to determine whetherramp rate control is required. For example, if power output 316 ispredicted to decrease at a rate in excess of the maximum compliant ramprate, controller 314 may preemptively implement ramp rate control togradually decrease power output 316.

In some embodiments, controller 314 identifies the minimum expectedvalue of power output 316 and determines when the predicted power outputis expected to reach the minimum value. Controller 314 may subtract theminimum expected power output 316 from the current power output 316 todetermine an amount by which power output 316 is expected to decrease.Controller 314 may apply the maximum allowable ramp rate to the amountby which power output 316 is expected to decrease to determine a minimumtime required to ramp down power output 316 in order to comply with themaximum allowable ramp rate. For example, controller 314 may divide theamount by which power output 316 is expected to decrease (e.g., measuredin units of power) by the maximum allowable ramp rate (e.g., measured inunits of power per unit time) to identify the minimum time required toramp down power output 316. Controller 314 may subtract the minimumrequired time from the time at which the predicted power output isexpected to reach the minimum value to determine when to startpreemptively ramping down power output 316.

Advantageously, controller 314 may preemptively act upon predicteddisturbances by causing power inverter 304 to ramp down power output 316before the disturbances affect PV field 302. This allows power inverter304 to ramp down power output 316 by using only a portion of the energygenerated by PV field 302 to generate power output 316 (i.e., performingthe ramp down while the power output is still high), rather thanrequiring additional energy from a battery (i.e., performing the rampdown after the power output has decreased). The remainder of the energygenerated by PV field 302 (i.e., the excess energy) may be stored inbattery 306 and/or dissipated.

Referring now to FIG. 12, a graph 1200 illustrating a preemptive ramprate control technique which can be used by controller 314 is shown,according to an exemplary embodiment. Graph 1200 plots the power outputP provided to energy grid 312 as a function of time t. The solid line1202 illustrates power output P without any ramp rate control, whereasthe broken line 1204 illustrates power output P with preemptive ramprate control.

Between times t₀ and t₂, power output P is at a high value P_(high). Attime t₂, a cloud begins to cast its shadow on PV field 302, causing thepower output of PV field 302 to suddenly decrease, until PV field 302 iscompletely in shadow at time t₃. Without any ramp rate control, thesudden drop in power output from PV field 302 causes the power output Pto rapidly drop from P_(high) to a low value P_(low) between times t₂and t₃. However, with preemptive ramp rate control, controller 314preemptively causes power inverter 304 to begin ramping down poweroutput P at time t₁, prior to the cloud casting a shadow on PV field302. The preemptive ramp down occurs between times t₁ and t₃, resultingin a ramp rate that is relatively more gradual. Triangular region 1206represents the energy generated by PV field 302 in excess of the ramprate limit. The excess energy may be limited by power inverter 304and/or stored in battery 306 to gradually decrease power output P at arate no greater than the ramp rate limit.

Between times t₃ and t₄, PV field 302 is completely in shadow. At timet₄, the shadow cast by the cloud begins to move off PV field 302,causing the power output of PV field 302 to suddenly increase, until PVfield 302 is entirely in sunlight at time t₅. Without any ramp ratecontrol, the sudden increase in power output from PV field 302 causesthe power output P to rapidly increase to the high value P_(high) attime t₅. However, with ramp rate control, power inverter 304 uses only aportion of the energy from PV field 302 to gradually increase poweroutput P to P_(high) at time t₆. Triangular region 1208 represents theenergy generated by PV field 302 in excess of the ramp rate limit. Theexcess energy may be limited by power inverter 304 and/or stored inbattery 306 to gradually increase power output P at a rate no greaterthan the ramp rate limit.

Notably, a significant portion of triangular region 1206 occurs betweentimes t₁ and t₂, before the disturbance affects PV field 302. As such,the decreasing ramp rate control provided by system 300 is a preemptiveprocess triggered by detecting an approaching cloud, prior to the cloudcasting a shadow upon PV field 302. In some embodiments, controller 314uses a predictive control technique (e.g., feedforward control, modelpredictive control, etc.) to perform ramp down control in system 300.For example, controller 314 may actively monitor the positions, sizes,velocities, and/or other attributes of clouds/shadows that couldpotentially cause a solar intensity disturbance affecting PV field 302.When an approaching cloud is detected at time t₁, controller 314 maypreemptively cause power inverter 304 to begin ramping down power output316. This allows power inverter 304 to ramp down power output 316 bylimiting the energy generated by PV field 302 while the power output isstill high, rather than requiring additional energy from a battery toperform the ramp down once the power output has dropped.

Frequency Regulation and Ramp Rate Controller

Referring now to FIG. 5, a block diagram illustrating controller 314 ingreater detail is shown, according to an exemplary embodiment.Controller 314 is shown to include a communications interface 502 and aprocessing circuit 504. Communications interface 502 may include wiredor wireless interfaces (e.g., jacks, antennas, transmitters, receivers,transceivers, wire terminals, etc.) for conducting data communicationswith various systems, devices, or networks. For example, communicationsinterface 302 may include an Ethernet card and port for sending andreceiving data via an Ethernet-based communications network and/or aWiFi transceiver for communicating via a wireless communicationsnetwork. Communications interface 502 may be configured to communicatevia local area networks or wide area networks (e.g., the Internet, abuilding WAN, etc.) and may use a variety of communications protocols(e.g., BACnet, IP, LON, etc.).

Communications interface 502 may be a network interface configured tofacilitate electronic data communications between controller 314 andvarious external systems or devices (e.g., PV field 302, energy grid312, PV field power inverter 304, battery power inverter 308, etc.). Forexample, controller 314 may receive a PV power signal from PV field 302indicating the current value of the PV power P_(PV) generated by PVfield 302. Controller 314 may use the PV power signal to predict one ormore future values for the PV power P_(PV) and generate a ramp ratesetpoint u_(RR). Controller 314 may receive a grid frequency signal fromenergy grid 312 indicating the current value of the grid frequency.Controller 314 may use the grid frequency to generate a frequencyregulation setpoint u_(FR). Controller 314 may use the ramp ratesetpoint u_(RR) and the frequency regulation setpoint u_(FR) to generatea battery power setpoint u_(bat) and may provide the battery powersetpoint u_(bat) to battery power inverter 308. Controller 314 may usethe battery power setpoint u_(bat) to generate a PV power setpointu_(PV) and may provide the PV power setpoint u_(PV) to PV field powerinverter 304.

Still referring to FIG. 5, processing circuit 504 is shown to include aprocessor 506 and memory 508. Processor 506 may be a general purpose orspecific purpose processor, an application specific integrated circuit(ASIC), one or more field programmable gate arrays (FPGAs), a group ofprocessing components, or other suitable processing components.Processor 506 may be configured to execute computer code or instructionsstored in memory 508 or received from other computer readable media(e.g., CDROM, network storage, a remote server, etc.).

Memory 508 may include one or more devices (e.g., memory units, memorydevices, storage devices, etc.) for storing data and/or computer codefor completing and/or facilitating the various processes described inthe present disclosure. Memory 508 may include random access memory(RAM), read-only memory (ROM), hard drive storage, temporary storage,non-volatile memory, flash memory, optical memory, or any other suitablememory for storing software objects and/or computer instructions. Memory508 may include database components, object code components, scriptcomponents, or any other type of information structure for supportingthe various activities and information structures described in thepresent disclosure. Memory 508 may be communicably connected toprocessor 506 via processing circuit 504 and may include computer codefor executing (e.g., by processor 506) one or more processes describedherein.

Predicting PV Power Output

Still referring to FIG. 5, controller 314 is shown to include a PV powerpredictor 512. PV power predictor 512 may receive the PV power signalfrom PV field 302 and use the PV power signal to make a short termprediction of the photovoltaic power output P_(PV). In some embodiments,PV power predictor 512 predicts the value of P_(PV) for the next timestep (i.e., a one step ahead prediction). For example, at each time stepk, PV power predictor 512 may predict the value of the PV power outputP_(PV) for the next time step k+1 (i.e., {circumflex over(P)}_(PV)(k+1)). Advantageously, predicting the next value for the PVpower output P_(PV) allows controller 314 to predict the ramp rate andperform an appropriate control action to prevent the ramp rate fromexceeding the ramp rate compliance limit.

In some embodiments, PV power predictor 512 performs a time seriesanalysis to predict {circumflex over (P)}_(PV)(k+1). A time series maybe defined by an ordered sequence of values of a variable at equallyspaced intervals. PV power predictor 512 may model changes betweenvalues of P_(PV) over time using an autoregressive moving average (ARMA)model or an autoregressive integrated moving average (ARIMA) model. PVpower predictor 512 may use the model to predict the next value of thePV power output P_(PV) and correct the prediction using a Kalman filtereach time a new measurement is acquired. The time series analysistechnique is described in greater detail in the following paragraphs.

In some embodiments, PV power predictor 512 uses a technique in theBox-Jenkins family of techniques to perform the time series analysis.These techniques are statistical tools that use past data (e.g., lags)to predict or correct new data, and other techniques to find theparameters or coefficients of the time series. A general representationof a time series from the Box-Jenkins approach is:

$X_{k} - {\sum\limits_{r = 1}^{p}\; {\phi_{r}X_{k - r}}} - {\sum\limits_{s = 0}^{q}\; {\theta_{s}\epsilon_{k - s}}}$

which is known as an ARMA process. In this representation, theparameters p and q define the order and number of lags of the timeseries, φ is an autoregressive parameter, and θ is a moving averageparameter. This representation is desirable for a stationary processwhich has a mean, variance, and autocorrelation structure that does notchange over time. However, if the original process {Y_(k)} representingthe time series values of P_(PV) is not stationary, X_(k) can representthe first difference (or higher order difference) of the process{Y_(k)−Y_(k−1)}. If the difference is stationary, PV power predictor 512may model the process as an ARIMA process.

PV power predictor 512 may be configured to determine whether to use anARMA model or an ARIMA model to model the time series of the PV poweroutput P_(PV). Determining whether to use an ARMA model or an ARIMAmodel may include identifying whether the process is stationary. Asshown in FIG. 2, the power output P_(PV) is not stationary. However, thefirst difference Y_(k)−Y_(k−1) may be stationary. Accordingly, PV powerpredictor 512 may select an ARIMA model to represent the time series ofP_(PV).

PV power predictor 512 may find values for the parameters p and q thatdefine the order and the number of lags of the time series. In someembodiments, PV power predictor 512 finds values for p and q by checkingthe partial autocorrelation function (PACF) and selecting a number wherethe PACF approaches zero (e.g., p=q). For the time series data shown inFIG. 2, PV power predictor 512 may determine that a 4^(th) or 5^(th)order model is appropriate. However, it is contemplated that PV powerpredictor 512 may select a different model order to represent differenttime series processes.

PV power predictor 512 may find values for the autoregressive parameterφ_(1 . . . p) and the moving average parameter θ_(1 . . . q). In someembodiments, PV power predictor 512 uses an optimization algorithm tofind values for φ_(1 . . . p) and θ_(1 . . . q) given the time seriesdata {Y_(k)}. For example, PV power predictor 512 may generate adiscrete-time ARIMA model of the form:

${{A(z)}{y(k)}} = {\lbrack \frac{C(z)}{1 - z^{- 1}} \rbrack {e(t)}}$

where A(z) and C(z) are defined as follows:

A(z)=1+φ₁ z ⁻¹+φ₂ z ⁻²+φ₃ ⁻³+φ₄ z ⁻⁴

C(z)=1+θ₁ z ⁻¹+θ₂ z ⁻²+θ₃ z ⁻³+θ+₄ z ⁻⁴

where the values for φ_(1 . . . p) and θ_(1 . . . q) are determined byfitting the model to the time series values of P_(PV).

In some embodiments, PV power predictor 512 uses the ARIMA model as anelement of a Kalman filter. The Kalman filter may be used by PV powerpredictor 512 to correct the estimated state and provide tighterpredictions based on actual values of the PV power output P_(PV). Inorder to use the ARIMA model with the Kalman filter, PV power predictor512 may generate a discrete-time state-space representation of the ARIMAmodel of the form:

x(k+1)=Ax(k)+Ke(k)

y(k)=Cx(k)+e(k)

where y(k) represents the values of the PV power output P_(PV) and e(k)is a disturbance considered to be normal with zero mean and a variancederived from the fitted model. It is contemplated that the state-spacemodel can be represented in a variety of different forms. For example,the ARIMA model can be rewritten as a difference equation and used togenerate a different state-space model using state-space modelingtechniques. In various embodiments, PV power predictor 512 may use anyof a variety of different forms of the state-space model.

The discrete Kalman filter consists of an iterative process that takes astate-space model and forwards it in time until there are available datato correct the predicted state and obtain a better estimate. Thecorrection may be based on the evolution of the mean and covariance ofan assumed white noise system. For example, PV power predictor 512 mayuse a state-space model of the following form:

x(k+1)=Ax(k)+Bu(k)+w(k) w(k)˜N(0,Q)

y(k)=Cx(k)+Du(k)+v(k) v(k)˜N(0,R)

where N( ) represents a normal distribution, v (k) is the measurementerror having zero mean and variance R, and w(k) is the process errorhaving zero mean and variance Q. The values of R and Q are designchoices. The variable x(k) is a state of the process and the variabley(k) represents the PV power output P_(PV) (k). This representation isreferred to as a stochastic state-space representation.

PV power predictor 512 may use the Kalman filter to perform an iterativeprocess to predict {circumflex over (P)}_(PV)(k+1) based on the currentand previous values of P_(PV) (e.g., P_(PV) (k), P_(PV) (k−1), etc.).The iterative process may include a prediction step and an update step.The prediction step moves the state estimate forward in time using thefollowing equations:

{circumflex over (x)} ⁻(k+1)=A*{circumflex over (x)}(k)

P ⁻(k+1)=A*P(k)*A ^(T) +Q

where {circumflex over (x)}(k) is the mean of the process or estimatedstate at time step k and P(k) is the covariance of the process at timestep k. The super index “-” indicates that the estimated state{circumflex over (x)}⁻(k+1) is based on the information known prior totime step k+1 (i.e., information up to time step k). In other words, themeasurements at time step k+1 have not yet been incorporated to generatethe state estimate {circumflex over (x)}⁻(k+1). This is known as an apriori state estimate.

PV power predictor 512 may predict the PV power output {circumflex over(P)}_(PV)(k+1) by determining the value of the predicted measurement(k+1). As previously described, the measurement y(k) and the state x(k)are related by the following equation:

y(k)=Cx(k)+e(k)

which allows PV power predictor 512 to predict the measurement ŷ⁻(k+1)as a function of the predicted state {circumflex over (x)}⁻(k+1). PVpower predictor 512 may use the measurement estimate ŷ⁻(k+1) as thevalue for the predicted PV power output {circumflex over (P)}_(PV)(k+1)(i.e., P_(PV)(k+1)=(k+1)).

The update step uses the following equations to correct the a prioristate estimate {circumflex over (x)}⁻(k+1) based on the actual(measured) value of y(k+1):

K=P ⁻(k+1)*C ^(T)*[R+C*P ⁻(k+1)*C ^(T)]⁻¹

{circumflex over (x)}(k+1)={circumflex over (x)}⁻(k+1)+K*[y(k+1)C*{circumflex over (x)} ⁻(k+1)]

P(k+1)=P ⁻(k+1)−K*[R+C*P ⁻(k+1)*C ^(T)]*K ^(T)

where y(k+1) corresponds to the actual measured value of P_(PV)(k+1).The variable (k+1) represents the a posteriori estimate of the state xat time k+1 given the information known up to time step k+1. The updatestep allows PV power predictor 512 to prepare the Kalman filter for thenext iteration of the prediction step.

Although PV power predictor 512 is primarily described as using a timeseries analysis to predict {circumflex over (P)}_(PV)(k+1), it iscontemplated that PV power predictor 512 may use any of a variety oftechniques to predict the next value of the PV power output P_(PV). Forexample, PV power predictor 512 may use a deterministic plus stochasticmodel trained from historical PV power output values (e.g., linearregression for the deterministic portion and an AR model for thestochastic portion). This technique is described in greater detail inU.S. patent application Ser. No. 14/717,593, titled “Building ManagementSystem for Forecasting Time Series Values of Building Variables” andfiled May 20, 2015, the entirety of which is incorporated by referenceherein.

In other embodiments, PV power predictor 512 uses input from clouddetectors (e.g., cameras, light intensity sensors, radar, etc.) topredict when an approaching cloud will cast a shadow upon PV field 302.When an approaching cloud is detected, PV power predictor 512 mayestimate an amount by which the solar intensity will decrease as aresult of the shadow and/or increase once the shadow has passed PV field302. PV power predictor 512 may use the predicted change in solarintensity to predict a corresponding change in the PV power outputP_(PV). This technique is described in greater detail in U.S.Provisional Patent Application No. 62/239,131 titled “Systems andMethods for Controlling Ramp Rate in a Photovoltaic Energy System” andfiled Oct. 8, 2015, the entirety of which is incorporated by referenceherein. PV power predictor 512 may provide the predicted PV power output{circumflex over (P)}_(PV)(k+1) to ramp rate controller 514.

Controlling Ramp Rate

Still referring to FIG. 5, controller 314 is shown to include a ramprate controller 514. Ramp rate controller 514 may be configured todetermine an amount of power to charge or discharge from battery 306 forramp rate control (i.e., u_(RR)). Advantageously, ramp rate controller514 may determine a value for the ramp rate power u_(RR) thatsimultaneously maintains the ramp rate of the PV power (i.e.,u_(RR)+P_(PV)) within compliance limits while allowing controller 314 toregulate the frequency of energy grid 312 and while maintaining thestate-of-charge of battery 306 within a predetermined desirable range.

In some embodiments, the ramp rate of the PV power is within compliancelimits as long as the actual ramp rate evaluated over a one minuteinterval does not exceed ten percent of the rated capacity of PV field302. The actual ramp rate may be evaluated over shorter intervals (e.g.,two seconds) and scaled up to a one minute interval. Therefore, a ramprate may be within compliance limits if the ramp rate satisfies one ormore of the following inequalities:

${{rr}} < {\frac{0.1P_{cap}}{30}( {1 + {tolerance}} )}$RR < 0.1P_(cap)(1 + tolerance)

where rr is the ramp rate calculated over a two second interval, RR isthe ramp rate calculated over a one minute interval, P_(cap) is therated capacity of PV field 302, and tolerance is an amount by which theactual ramp rate can exceed the compliance limit without resulting in anon-compliance violation (e.g., tolerance=10%). In this formulation, theramp rates rr and RR represent a difference in the PV power (e.g.,measured in kW) at the beginning and end of the ramp rate evaluationinterval.

Simultaneous implementation of ramp rate control and frequencyregulation can be challenging (e.g., can result in non-compliance),especially if the ramp rate is calculated as the difference in the powerP_(POI) at POI 310. In some embodiments, the ramp rate over a two secondinterval is defined as follows:

rr=[P _(POI)(k)−P _(POI)(k−1)]−[u _(FR)(k)−u _(FR)(k−1)]

where P_(POI)(k−1) and P_(POI)(k) are the total powers at POI 310measured at the beginning and end, respectively, of a two secondinterval, and u_(FR) (k−1) and u_(FR)(k) are the powers used forfrequency regulation measured at the beginning and end, respectively, ofthe two second interval.

The total power at POI 310 (i.e., P_(POI)) is the sum of the poweroutput of PV field power inverter 304 (i.e., u_(PV)) and the poweroutput of battery power inverter 308 (i.e., u_(bat)=u_(FR)+u_(RR)).Assuming that PV field power inverter 304 is not limiting the powerP_(PV) generated by PV field 302, the output of PV field power inverter304 u_(PV) may be equal to the PV power output P_(PV) (i.e.,P_(PV)=u_(PV)) and the total power P_(POI) at POI 310 can be calculatedusing the following equation:

P _(POI) =P _(PV) +u _(FR) +u _(RR)

Therefore, the ramp rate rr can be rewritten as:

rr=P _(PV)(k)−P _(PV)(k−1)+u _(RR)(k)−u _(RR)(k−1)

and the inequality which must be satisfied to comply with the ramp ratelimit can be rewritten as:

${{{P_{PV}(k)} - {P_{PV}( {k - 1} )} + {u_{RR}(k)} - {u_{RR}( {k - 1} )}}} < {\frac{0.1P_{cap}}{30}( {1 + {tolerance}} )}$

where P_(PV)(k−1) and P_(PV)(k) are the power outputs of PV field 302measured at the beginning and end, respectively, of the two secondinterval, and u_(RR)(k−1) and u_(RR)(k) are the powers used for ramprate control measured at the beginning and end, respectively, of the twosecond interval.

In some embodiments, ramp rate controller 514 determines the ramp ratecompliance of a facility based on the number of scans (i.e., monitoredintervals) in violation that occur within a predetermined time period(e.g., one week) and the total number of scans that occur during thepredetermined time period. For example, the ramp rate compliance RRC maybe defined as a percentage and calculated as follows:

${RRC} = {100( {1 - \frac{n_{vscan}}{n_{tscan}}} )}$

where n_(vscan) is the number of scans over the predetermined timeperiod where rr is in violation and n_(tscan) is the total number ofscans during which the facility is performing ramp rate control duringthe predetermined time period.

In some embodiments, the intervals that are monitored or scanned todetermine ramp rate compliance are selected arbitrarily or randomly(e.g., by a power utility). Therefore, it may be impossible to predictwhich intervals will be monitored. Additionally, the start times and endtimes of the intervals may be unknown. In order to guarantee ramp ratecompliance and minimize the number of scans where the ramp rate is inviolation, ramp rate controller 514 may determine the amount of poweru_(RR) used for ramp rate control ahead of time. In other words, ramprate controller 514 may determine, at each instant, the amount of poweru_(RR) to be used for ramp rate control at the next instant. Since thestart and end times of the intervals may be unknown, ramp ratecontroller 514 may perform ramp rate control at smaller time intervals(e.g., on the order of milliseconds).

As shown in FIG. 6, ramp rate controller 514 may use the predicted PVpower {circumflex over (P)}_(PV) (k+1) at instant k+1 and the current PVpower P_(PV)(k) at instant k to determine the ramp rate control powerû_(RR) _(T) (k) at instant k. Advantageously, this allows ramp ratecontroller 514 to determine whether the PV power P_(PV) is in anup-ramp, a down-ramp, or no-ramp at instant k. Assuming a T seconds timeresolution, ramp rate controller 514 may determine the value of thepower for ramp rate control û_(RR) _(T) (k) at instant k based on thepredicted value of the PV power {circumflex over (P)}_(PV)(k+1), thecurrent value of the PV power P_(PV)(k), and the previous power used forramp rate control û_(RR) _(T) (k−1). Scaling to T seconds and assuming atolerance of zero, ramp rate compliance is guaranteed if û_(RR) _(T) (k)satisfies the following inequality:

lb _(RR) _(T) ≤û _(RR) _(T) ≤ub _(RR) _(T)

where T is the sampling time in seconds, lb_(RR) _(T) is the lower boundon û_(RR) _(T) (k), and ub_(RR) _(T) is the upper bound on û_(RR) _(T)(k).

In some embodiments, the lower bound lb_(RR) _(T) and the upper boundub_(RR) _(T) are defined as follows:

${lb}_{{RR}_{T}} = {{- ( {{{\hat{P}}_{PV}( {k + 1} )} - {P_{PV}(k)}} )} + {{\hat{u}}_{{RR}_{T}}( {k - 1} )} - \frac{0.1P_{cap}}{60\text{/}T} + {\lambda\sigma}}$${ub}_{{RR}_{T}} = {{- ( {{{\hat{P}}_{PV}( {k + 1} )} - {P_{PV}(k)}} )} + {{\hat{u}}_{{RR}_{T}}( {k - 1} )} + \frac{0.1P_{cap}}{60\text{/}T} - {\lambda\sigma}}$

where σ is the uncertainty on the PV power prediction and λ is a scalingfactor of the uncertainty in the PV power prediction. Advantageously,the lower bound lb_(RR) _(T) and the upper bound ub_(RR) _(T) provide arange of ramp rate power û_(RR) _(T) (k) that guarantees compliance ofthe rate of change in the PV power.

In some embodiments, ramp rate controller 514 determines the ramp ratepower û_(RR) _(T) (k) based on whether the PV power P_(PV) is in anup-ramp, a down-ramp, or no-ramp (e.g., the PV power is not changing orchanging at a compliant rate) at instant k. Ramp rate controller 514 mayalso consider the state-of-charge (SOC) of battery 306 when determiningû_(RR) _(T) (k) Exemplary processes which may be performed by ramp ratecontroller 514 to generate values for the ramp rate power û_(RR) _(T)(k) are described in detail with reference to FIGS. 8-10. Ramp ratecontroller 514 may provide the ramp rate power setpoint û_(RR) _(T) (k)to battery power setpoint generator 518 for use in determining thebattery power setpoint u_(bat).

Controlling Frequency Regulation

Referring again to FIG. 5, controller 314 is shown to include afrequency regulation controller 516. Frequency regulation controller 516may be configured to determine an amount of power to charge or dischargefrom battery 306 for frequency regulation (i.e., u_(FR)). Frequencyregulation controller 516 is shown receiving a grid frequency signalfrom energy grid 312. The grid frequency signal may specify the currentgrid frequency f_(grid) of energy grid 312. In some embodiments, thegrid frequency signal also includes a scheduled or desired gridfrequency f_(s) to be achieved by performing frequency regulation.Frequency regulation controller 516 may determine the frequencyregulation setpoint u_(FR) based on the difference between the currentgrid frequency f_(grid) and the scheduled frequency f_(s).

In some embodiments, the range within which the grid frequency f_(grid)is allowed to fluctuate is determined by an electric utility. Anyfrequencies falling outside the permissible range may be corrected byperforming frequency regulation. Facilities participating in frequencyregulation may be required to supply or consume a contracted power forpurposes of regulating grid frequency f_(grid) (e.g., up to 10% of therated capacity of PV field 302 per frequency regulation event).

In some embodiments, frequency regulation controller 516 performsfrequency regulation using a dead-band control technique with a gainthat is dependent upon the difference f_(e) between the scheduled gridfrequency f_(s) and the actual grid frequency f_(grid) (i.e.,f_(e)=f_(s)−f_(grid)) and an amount of power required for regulating agiven deviation amount of frequency error f_(e). Such a controltechnique is shown graphically in FIG. 7 and expressed mathematically bythe following equation:

u _(FR)(k)=min(max(lb _(FR),α),ub _(FR))

where lb_(FR) and ub_(FR) are the contracted amounts of power up towhich power is to be consumed or supplied by a facility. lb_(FR) andub_(FR) may be based on the rated capacity P_(cap) of PV field 302 asshown in the following equations:

lb _(FR)=−0.1×P _(cap)

ub _(FR)=0.1×P _(cap)

The variable a represents the required amount of power to be supplied orconsumed from energy grid 312 to offset the frequency error f_(e). Insome embodiments, frequency regulation controller 516 calculates a usingthe following equation:

α=K _(FR)×sign(f _(e))×max(|f _(e) |−d _(band),0)

where d_(band) is the threshold beyond which a deviation in gridfrequency must be regulated and K_(FR) is the control gain. In someembodiments, frequency regulation controller 516 calculates the controlgain K_(FR) as follows:

$K_{FR} = \frac{P_{cap}}{0.01 \times {droop} \times f_{s}}$

where droop is a parameter specifying a percentage that defines how muchpower must be supplied or consumed to offset a 1 Hz deviation in thegrid frequency. Frequency regulation controller 516 may calculate thefrequency regulation setpoint u_(FR) using these equations and mayprovide the frequency regulation setpoint to battery power setpointgenerator 518.

Generating Battery Power Setpoints

Still referring to FIG. 5, controller 314 is shown to include a batterypower setpoint generator 518. Battery power setpoint generator 518 maybe configured to generate the battery power setpoint u_(bat) for batterypower inverter 308. The battery power setpoint u_(bat) is used bybattery power inverter 308 to control an amount of power drawn frombattery 306 or stored in battery 306. For example, battery powerinverter 308 may draw power from battery 306 in response to receiving apositive battery power setpoint u_(bat) from battery power setpointgenerator 518 and may store power in battery 306 in response toreceiving a negative battery power setpoint u_(bat) from battery powersetpoint generator 518.

Battery power setpoint generator 518 is shown receiving the ramp ratepower setpoint u_(RR) from ramp rate controller 514 and the frequencyregulation power setpoint u_(FR) from frequency regulation controller516. In some embodiments, battery power setpoint generator 518calculates a value for the battery power setpoint u_(bat) by adding theramp rate power setpoint u_(RR) and the frequency response powersetpoint u_(FR). For example, battery power setpoint generator 518 maycalculate the battery power setpoint u_(bat) using the followingequation:

u _(bat) =u _(RR) +u _(FR)

In some embodiments, battery power setpoint generator 518 adjusts thebattery power setpoint u_(bat) based on a battery power limit forbattery 306. For example, battery power setpoint generator 518 maycompare the battery power setpoint u_(bat) with the battery power limitbattPowerLimit. If the battery power setpoint is greater than thebattery power limit (i.e., u_(bat)>battPowerLimit), battery powersetpoint generator 518 may replace the battery power setpoint u_(bat)with the battery power limit. Similarly, if the battery power setpointis less than the negative of the battery power limit (i.e.,u_(bat)<−battPowerLimit), battery power setpoint generator 518 mayreplace the battery power setpoint u_(bat) with the negative of thebattery power limit.

In some embodiments, battery power setpoint generator 518 causesfrequency regulation controller 516 to update the frequency regulationsetpoint u_(FR) in response to replacing the battery power setpointu_(bat) with the battery power limit battPowerLimit or the negative ofthe battery power limit −battPowerLimit. For example, if the batterypower setpoint u_(bat) is replaced with the positive battery power limitbattPowerLimit, frequency regulation controller 516 may update thefrequency regulation setpoint u_(FR) using the following equation:

u _(FR)(k)=−battPowerLimit−û _(RR) _(T) (k)

Similarly, if the battery power setpoint u_(bat) is replaced with thenegative battery power limit −battPowerLimit, frequency regulationcontroller 516 may update the frequency regulation setpoint u_(FR) usingthe following equation:

u _(FR)(k)=−battPowerLimit−û _(RR) _(T) (k)

These updates ensure that the amount of power used for ramp rate controlû_(RR) _(T) (k) and the amount of power used for frequency regulationu_(FR)(k) can be added together to calculate the battery power setpointu_(bat). Battery power setpoint generator 518 may provide the batterypower setpoint u_(bat) to battery power inverter 308 and to PV powersetpoint generator 520.

Generating PV Power Setpoints

Still referring to FIG. 5, controller 314 is shown to include a PV powersetpoint generator 520. PV power setpoint generator 520 may beconfigured to generate the PV power setpoint u_(PV) for PV field powerinverter 304. The PV power setpoint u_(PV) is used by PV field powerinverter 304 to control an amount of power from PV field 302 to provideto POI 310.

In some embodiments, PV power setpoint generator 520 sets a default PVpower setpoint u_(PV)(k) for instant k based on the previous value ofthe PV power P_(PV)(k−1) at instant k−1. For example, PV power setpointgenerator 520 may increment the previous PV power P_(PV)(k−1) with thecompliance limit as shown in the following equation:

${u_{PV}(k)} = {{P_{PV}( {k - 1} )} + \frac{0.1P_{cap}}{60\text{/}T} - {\lambda\sigma}}$

This guarantees compliance with the ramp rate compliance limit andgradual ramping of the PV power output to energy grid 312. The defaultPV power setpoint may be useful to guarantee ramp rate compliance whenthe system is turned on, for example, in the middle of a sunny day orwhen an up-ramp in the PV power output P_(PV) is to be handled bylimiting the PV power at PV power inverter 304 instead of chargingbattery 306.

In some embodiments, PV power setpoint generator 520 updates the PVpower setpoint u_(PV)(k) based on the value of the battery powersetpoint u_(bat)(k) so that the total power provided to POI 310 does notexceed a POI power limit. For example, PV power setpoint generator 520may use the PV power setpoint u_(PV)(k) and the battery power setpointu_(bat)(k) to calculate the total power P_(POI)(k) at point ofintersection 310 using the following equation:

P _(POI)(k)=u _(bat)(k)+u _(PV)(k)

PV power setpoint generator 520 may compare the calculated powerP_(POI)(k) with a power limit for POI 310 (i.e., POIPowerLimit). If thecalculated power P_(POI)(k) exceeds the POI power limit (i.e.,P_(POI)(k)>POIPowerLimit), PV power setpoint generator 520 may replacethe calculated power P_(POI)(k) with the POI power limit. PV powersetpoint generator 520 may update the PV power setpoint u_(PV)(k) usingthe following equation:

u _(PV)(k)=POIPowerLimit−u _(bat)(k)

This ensures that the total power provided to POI 310 does not exceedthe POI power limit by causing PV field power inverter 304 to limit thePV power. PV power setpoint generator 520 may provide the PV powersetpoint u_(PV) to PV field power inverter 304.

Frequency Regulation and Ramp Rate Control Processes Generating RampRate Power Setpoints

Referring now to FIG. 8, a flowchart of a process 800 for generating aramp rate power setpoint is shown, according to an exemplary embodiment.Process 800 may be performed by one or more components of controller 314(e.g., PV power predictor, 512 ramp rate controller 514, etc.) togenerate the ramp rate power setpoint û_(RR) _(T) (k). A more detailedversion of process 800 is described with reference to FIGS. 9A-9D.

Process 800 is shown to include receiving a photovoltaic (PV) powersignal indicating a power output P_(PV) of a PV field (step 802) andpredicting a future power output of the PV field based on the PV powersignal (step 804). Steps 802-804 may be performed by PV power predictor512, as described with reference to FIG. 5. Step 804 may includeperforming a time series analysis of the PV power signal at each instantk to predict the value of the PV power output {circumflex over(P)}_(PV)(k+1) at the next instant k+1. In some embodiments, step 804includes using a Kalman filter to perform an iterative process topredict {circumflex over (P)}_(PV)(k+1) based on the current andprevious values of P_(PV) (e.g., P_(PV)(k), P_(PV)(k−1), etc.).

Process 800 is shown to include generating upper and lower bounds for aramp rate control power based on the current and predicted power outputs(step 806). Step 806 may be performed by ramp rate controller 514, asdescribed with reference to FIG. 5. The upper and lower bounds placeupper and lower limits on the ramp rate control power û_(RR) _(T) (k),as shown in the following equation:

lb _(RR) _(T) ≤û _(RR) _(T) (k)≤ub _(RR) _(T)

where lb_(RR) _(T) is the lower bound and ub_(RR) _(T) is the upperbound. In some embodiments, step 806 includes calculating the upperbound ub_(RR) _(T) and the lower bound lb_(RR) _(T) using the followingequations:

${lb}_{{RR}_{T}} = {{- ( {{{\hat{P}}_{PV}( {k + 1} )} - {P_{PV}(k)}} )} + {{\hat{u}}_{{RR}_{T}}( {k - 1} )} - \frac{0.1P_{cap}}{60\text{/}T} + {\lambda\sigma}}$${ub}_{{RR}_{T}} = {{- ( {{{\hat{P}}_{PV}( {k + 1} )} - {P_{PV}(k)}} )} + {{\hat{u}}_{{RR}_{T}}( {k - 1} )} + \frac{0.1P_{cap}}{60\text{/}T} - {\lambda\sigma}}$

where {circumflex over (P)}_(PV)(k+1) is the value of the PV poweroutput at instant k+1 predicted in step 804, P_(PV)(k) is the currentvalue of the PV power output at instant k, û_(RR) _(T) (k−1) is theprevious value of the ramp rate control power determined for instantk−1, P_(cap) is the rated capacity of the PV field, T is the timeinterval over which the ramp rate is calculated (e.g., two seconds, 100milliseconds, microseconds, etc.), σ is the uncertainty of the predictedPV power output {circumflex over (P)}_(PV)(k+1), and λ is a scalingfactor of the uncertainty in the PV power prediction.

Still referring to FIG. 8, process 800 is shown to include detecting aramp rate condition of the PV power output based on the upper and lowerbounds (step 808). Step 808 may include determining whether the PV poweroutput is currently ramping-up, ramping-down, or not ramping. Ramping-upmay occur when the PV power output P_(PV) is increasing at a rate thatexceeds the ramp rate compliance limit. Ramping-down may occur when thePV power output P_(PV) is decreasing at a rate that exceeds the ramprate compliance limit. If the PV power output P_(PV) is neitherramping-up nor ramping-down the PV power output may be considered to benot ramping (e.g., not changing or changing at a rate within the ramprate compliance limit).

Advantageously, the values of the upper bound ub_(RR) _(T) and the lowerbound lb_(RR) _(T) can be used to determine the ramp rate condition. Forexample, if both the upper bound ub_(RR) _(T) and the lower boundlb_(RR) _(T) are positive (i.e., lb_(RR) _(T) >0), the ramp rate controlpower û_(RR) _(T) (k) must also be positive. This indicates that powerwill be drawn from the battery in order to compensate for a ramping-downof the PV power output. Conversely, if both the upper bound ub_(RR) _(T)and the lower bound lb_(RR) _(T) are negative (i.e., ub_(RR) _(T) <0),the ramp rate control power û_(RR) _(T) (k) must also be negative. Thisindicates that power will be stored in the battery (or dissipated by PVfield power inverter 304) in order to compensate for a ramping-up of thePV power output. If the upper bound ub_(RR) _(T) is positive and thelower bound lb_(RR) _(T) is negative, the ramp rate control power û_(RR)_(T) (k) can have a value of zero. This indicates ramp rate control isnot required since the PV power output is neither ramping-up norramping-down.

Still referring to FIG. 8, process 800 is shown to include determiningwhether a battery connected to the PV field requires charging ordischarging based on a current state-of-charge (SOC) of the battery(step 810). Step 810 may include comparing the current SOC of thebattery (i.e., SOC) to a SOC setpoint (i.e., SOC_(sp)). If thedifference between the SOC of the battery and the SOC setpoint exceeds athreshold value (i.e., SOC_(tol)), charging or discharging may berequired. For example, charging may be required if the current SOC ofthe battery is less than the SOC setpoint by an amount exceeding thethreshold (i.e., SOC−SOC_(sp)<−SOC_(tol)). Conversely, discharging maybe required if the current SOC of the battery is greater than the SOCsetpoint by an amount exceeding the threshold (i.e.,SOC−SOC_(sp)>SOC_(tol)). If the difference between the SOC of thebattery and the SOC setpoint does not exceed the threshold value (i.e.,|SOC−SOC_(sp)|≤SOC_(tol)), neither charging nor discharging may berequired to maintain the desired state-of-charge. However, the batterymay still be charged or discharged to ensure that the ramp rate remainswithin compliance limits, as previously described.

Process 800 is shown to include generating a ramp rate power setpointbased on the detected ramp rate condition of the PV power output (e.g.,ramping-up, ramping-down, not ramping) and the SOC of the battery (step812). If the PV power output is not ramping, there is not a need tocharge or discharge the battery for ramp rate control. If the SOC of thebattery is within a desirable range (e.g., a range around 50% charge),there is not a need to charge or discharge the battery. If both of theseconditions are met, the ramp rate power setpoint ü_(RR) _(T) (k) may beset to zero:

ü _(RR) _(T) (k)=0

However, if the SOC of the battery is greater than the upper limit ofthe desirable range while not ramping, discharging the battery may bedesirable and the ramp rate power setpoint ü_(RR) _(T) (k) may be set toa positive value. The value of the ramp rate setpoint ü_(RR) _(T) (k)may be a fraction of the upper bound ub_(RR) _(T) , which may bedependent on how far the SOC is from the upper limit of the desirablerange, as shown in the following equation:

ü _(RR) _(T) (k)(ub _(RR) _(T) )(SOC−SOC_(sp)−SOC_(tot))(SOC_(gain))

Conversely, if the SOC of the battery is less than the lower limit ofthe desirable range while not ramping, charging the battery may bedesirable and the ramp rate power setpoint ü_(RR) _(T) (k) may be set toa negative value. The value of the ramp rate setpoint ü_(RR) _(T) (k)may be a fraction of the lower bound lb_(RR) _(T) , which may bedependent on how far the SOC is from the lower limit of the desirablerange, as shown in the following equation:

ü _(RR) _(T) (k)=(−lb _(RR) _(T) )(SOC−SOC_(sp)+SOC_(tot))(SOC_(gain))

If the PV power output is ramping-up, the upper bound ub_(RR) _(T) andthe lower bound lb_(RR) _(T) are both negative, which may indicate aneed to charge the battery. During an up-ramp, in addition to the optionof charging the battery, PV field power inverter 304 may be used tolimit the output power of PV field 302 (e.g., by limiting P_(PV)) andguarantee compliance with the ramp rate limit. If the SOC of the batteryis within or above the desirable range during an up-ramp, the batterydoes not need to be charged. Therefore, the ramp rate power ü_(RR) _(T)(k) can be set to zero, as shown in the following equation:

ü _(RR) _(T) (k)=0

and the PV power setpoint u_(PV) can be used to control the ramp rate.In some embodiments, the ramp rate power ü_(RR) _(T) (k) is set to zeroonly if the ramp rate compliance limit will not be violated. Thiscriterion may be useful to prevent non-compliance under the circumstancewhen the battery is charging during an up-ramp and ramp rate control isswitched to PV field power inverter 304 when the desired SOC of thebattery is reached.

Conversely, if the SOC of the battery is below the desirable rangeduring an up-ramp, the battery may be charged at a rate that is at leastequal to the upper bound ub_(RR) _(T) plus a fraction of the differencebetween the upper and lower bounds, which may be dependent on how farthe SOC is from the lower limit of the desirable range, as shown in thefollowing equation:

ü _(RR) _(T) (k)=(ub _(RR) _(T) −lb _(RR) _(T))(SOC−SOC_(sp)−SOC_(tot))(SOC_(gain))+ub _(RR) _(t)

If the PV power output is ramping-down, the upper bound ub_(RR) _(T) andthe lower bound lb_(RR) _(T) are both positive, which may indicate aneed to discharge the battery. During a down-ramp, if the SOC of thebattery is below or within the desirable range, the minimum amount ofpower required to comply with the ramp rate limit may be discharged bythe battery, as shown in the following equation:

ü _(RR) _(T) (k)=lb _(RR) _(T)

However, if the SOC is above the upper limit of the desirable rangeduring a down-ramp, the ramp rate control power ü_(RR) _(T) (k) may beset to either the upper bound ub_(RR) _(T) or the lower bound plus afraction of the difference between the upper bound and the lower bound,as shown in the following equation:

${{\hat{u}}_{{RR}_{T}}(k)} = {\min \begin{pmatrix}{{( {{ub}_{{RR}_{T}} - {lb}_{{RR}_{T}}} )( {{SOC} - {SOC}_{sp} - {SOC}_{tol}} )( {SOC}_{gain} )} + {lb}_{{RR}_{T}}} \\{ub}_{{RR}_{T}}\end{pmatrix}}$

In some embodiments, process 800 includes adjusting ramp rate powersetpoint ü_(RR) _(T) (k) determined in step 812 to ensure that thebattery power limit is respected. For example, if the ramp rate powersetpoint ü_(RR) _(T) (k) would exceed the battery power limitbattPowerLimit, the ramp rate power setpoint may be reduced to be equalto the battery power limit. Similarly, if the ramp rate power setpointu_(RR) _(T) (k) is less than the negative battery power limit−battPowerLimit, the ramp rate power setpoint may be increased to beequal to the negative battery power limit.

Referring now to FIGS. 9A-9D, another process 900 for generating a ramprate power setpoint is shown, according to an exemplary embodiment.Process 900 may be performed by one or more components of controller 314(e.g., PV power predictor, 512 ramp rate controller 514, etc.) togenerate the ramp rate power setpoint ü_(RR) _(T) (k). Process 900 is amore detailed version of process 800 described with reference to FIG. 8.

Referring particularly to FIG. 9A, process 900 is shown to includereceiving a photovoltaic (PV) power measurement P_(PV)(k) (step 902) andusing the PV power measurement P_(PV)(k) to predict a future PV poweroutput {circumflex over (P)}_(PV)(k+1) (step 904). Steps 902-904 may beperformed by PV power predictor 512, as described with reference to FIG.5. The future PV power output {circumflex over (P)}_(PV)(k+1) may be afunction of the PV power measurement P_(PV)(k) as shown in the followingequation:

{circumflex over (P)} _(PV)(k+1)=f(P _(PV)(k))

Step 904 may include performing a time series analysis of the PV powersignal at each instant k to predict the value of the PV power output{circumflex over (P)}_(PV)(k+1) at the next instant k+1. In someembodiments, step 904 includes using a Kalman filter to perform aniterative process to predict {circumflex over (P)}_(p) (k+1) based onthe current and previous values of P_(PV) (e.g., P_(PV)(k), P_(PV)(k−1),etc.).

Process 900 is shown to include setting a default PV inverter powersetpoint u_(PV)(k) (step 906). In some embodiments, the default PVinverter power setpoint u_(PV)(k) is a function of the PV powermeasurement P_(PV). For example, the default PV inverter power u_(PV)(k)setpoint may be the current PV power measurement incremented by thecompliance limit, as shown in the following equation:

${u_{PV}(k)} = {{P_{PV}(k)} + \frac{{0.1}P_{Cap}}{6{0/T}} - {\lambda \sigma}}$

where P_(cap) is the rated power capacity of the PV field, T is the timeinterval over which the ramp rate is calculated (e.g., two seconds,microseconds, etc.), σ is the uncertainty of the predicted PV poweroutput {circumflex over (P)}_(PV)(k+1), and λ is a scaling factor of theuncertainty in the PV power prediction. This guarantees compliance andgradual ramping of the PV power output to the grid and may be useful toprevent the ramp rate compliance limit from being exceeded when thesystem is first turned on or when an up-ramp is handled using PV fieldpower inverter 304 instead of charging battery 306.

Still referring to FIG. 9A, process 900 is shown to include generatingupper and lower ramp rate power bounds ub_(RR) _(T) and lb_(RR) _(T)(step 908). The upper and lower bounds place upper and lower limits onthe ramp rate control power ü_(RR) _(T) (k). In some embodiments, theupper and lower bounds ub_(RR) _(T) and lb_(RR) _(T) are calculatedusing the following equations:

${lb_{{RR}_{T}}} = {{- ( {{{\hat{P}}_{PV}( {k + 1} )} - {P_{PV}(k)}} )} + {{\hat{u}}_{{RR}_{T}}( {k - 1} )} - \frac{{0.1}P_{cap}}{6{0/T}} + {\lambda \sigma}}$${ub_{{RR}_{T}}} = {{- ( {{{\hat{P}}_{PV}( {k + 1} )} - {P_{PV}(k)}} )} + {{\hat{u}}_{{RR}_{T}}( {k - 1} )} + \frac{{0.1}P_{cap}}{6{0/T}} - {\lambda \sigma}}$

Advantageously, the values of the upper bound ub_(RR) _(T) and the lowerbound lb_(RR) _(T) can be used to determine whether the PV power outputis ramping-up, ramping-down, or not ramping.

Process 900 is shown to include determining whether the upper boundub_(RR) _(T) and the lower bound lb_(RR) _(T) have opposite signs (step910). The upper bound ub_(RR) _(T) and the lower bound lb_(RR) _(T) mayhave opposite signs when the upper bound ub_(RR) _(T) is positive andthe lower bound lb_(RR) _(T) is negative. The sign( ) function in step910 returns the value 1 when the product of the upper bound ub_(RR) _(T)and the lower bound lb_(RR) _(T) is positive (i.e., the upper boundub_(RR) _(T) and the lower bound lb_(RR) _(T) have the same sign) andreturns −1 when the product of the upper bound ub_(RR) _(T) and thelower bound lb_(RR) _(T) is negative (i.e., the upper bound ub_(RR) _(T)and the lower bound lb_(RR) _(T) have opposite signs).

If the upper bound ub_(RR) _(T) is positive and the lower bound lb_(RR)_(T) is negative, the ramp rate control power ü_(RR) _(T) (k) can have avalue of zero. This indicates ramp rate control is not required sincethe PV power output is neither ramping-up nor ramping-down. In responseto a determination that the upper bound ub_(RR) _(T) and the lower boundlb_(RR) _(T) have opposite signs (i.e., the result of step 910 is“yes”), process 900 proceeds to determining that the ramp rate is withinthe compliance limit (step 912). In response to a determination that theupper bound ub_(RR) _(T) and the lower bound lb_(RR) _(T) do not haveopposite signs (i.e., the result of step 910 is “no”), process 900proceeds to step 914.

Process 900 is shown to include determining whether the upper boundub_(RR) _(T) is negative (step 914). The upper bound ub_(RR) _(T) isnegative when both the upper bound ub_(RR) _(T) and the lower boundlb_(RR) _(T) are negative, which requires the ramp rate control powerü_(RR) _(T) (k) to also be negative. This indicates that power will bestored in the battery (or limited by PV field power inverter 304) inorder to compensate for a ramping-up of the PV power output. In responseto a determination that the upper bound ub_(RR) _(T) is negative (i.e.,the result of step 914 is “yes”), process 900 proceeds to determiningthat a ramp-up is detected (step 916). In response to a determinationthat the upper bound ub_(RR) _(T) is not negative (i.e., the result ofstep 914 is “no”), process 900 proceeds to step 918.

Process 900 is shown to include determining whether the lower boundlb_(RR) _(T) is positive (step 918). The lower bound lb_(RR) _(T) ispositive when both the upper bound ub_(RR) _(T) and the lower boundlb_(RR) _(T) are positive, which requires the ramp rate control powerü_(RR) _(T) (k) to also be positive. This indicates that power will bedrawn from the battery in order to compensate for a ramping-down of thePV power output. In response to a determination that the lower boundlb_(RR) _(T) is positive (i.e., the result of step 918 is “yes”),process 900 proceeds to determining that a ramp-down is detected (step920).

Referring now to FIG. 9B, several steps 922-932 of process 900 areshown, according to an exemplary embodiment. Steps 922-932 may beperformed in response to a determination that the ramp rate is withinthe compliance limit (step 912), indicating that ramp rate control isnot required. Steps 922-932 can be used to determine a ramp rate controlpower that charges or discharges the battery in order to maintain thestate-of-charge (SOC) of the battery within a desirable range (e.g., aSOC setpoint±a tolerance).

Process 900 is shown to include determining whether the differencebetween the state-of-charge of the battery SOC and a setpointstate-of-charge SOC_(sp) is within a range defined by a state-of-chargetolerance SOC_(tol) (i.e., |SOC−SOC_(sp)|<SOC_(tol)) (step 922). If theabsolute value of the difference between SOC and SOC_(sp) is less thanor equal to SOC_(tol) (i.e., the result of step 922 is “yes”), process900 proceeds to setting the ramp rate power setpoint to zero (step 924).Step 924 may be performed when ramp rate control is not required andwhen the SOC of the battery is already within the desirable range. Inresponse to a determination that SOC differs from SOC_(sp) by more thanSOC_(tol) (i.e., the result of step 922 is “no”), process 900 proceedsto step 926.

Process 900 is shown to include determining whether the state-of-chargeof the battery SOC exceeds the setpoint state-of-charge SOC_(sp) by morethan the state-of-charge tolerance SOC_(tol) (step 926). IfSOC−SOC_(sp)>SOC_(tol) (i.e., the result of step 926 is “yes”), it maybe desirable to discharge the battery to move SOC closer to SOC_(sp) andprocess 900 may proceed to step 928. In step 928, the ramp rate powersetpoint û_(RR) _(T) (k) is set to the minimum of the battery powerlimit battPowerLimit, the upper bound ub_(RR) _(T) , and a fraction ofthe upper bound ub_(RR) _(T) , as shown in the following equation:

${{\hat{u}}_{{RR}_{T}}(k)} = {\min \begin{pmatrix}{( {ub_{{RR}_{T}}} )( {{SOC} - {SOC}_{sp} - {SOC}_{tol}} )( {SOC}_{gain} )} \\{ub_{{RR}_{T}}} \\{battPowerLimit}\end{pmatrix}}$

where the fraction of the upper bound ub_(RR) _(T) is based on thedifference between SOC and the upper limit on the setpoint tolerancerange (i.e., SOC−SOC_(sp)−SOC_(tol)) multiplied by a gain valueSOC_(gain).

Process 900 is shown to include determining whether the setpointstate-of-charge SOC_(sp) exceeds the state-of-charge of the battery SOCby more than the state-of-charge tolerance SOC_(tol) (step 930). IfSOC−SOC_(sp)<SOC_(tol) (i.e., the result of step 930 is “yes”), it maybe desirable to charge the battery to move SOC closer to SOC_(sp) andprocess 900 may proceed to step 932. In step 932, the ramp rate powersetpoint û_(RR) _(T) (k) is set to the maximum of the negative batterypower limit −battPowerLimit, the lower bound lb_(RR) _(T) , and afraction of the lower bound lb_(RR) _(T) , as shown in the followingequation:

${{\hat{u}}_{RR_{T}}(k)} = {\max \begin{pmatrix}{( {{- l}b_{{RR}_{T}}} )( {{SOC} - {SOC}_{sp} + {SOC}_{tol}} )( {SOC}_{gain} )} \\{lb_{{RR}_{T}}} \\{- {battPowerLimit}}\end{pmatrix}}$

where the fraction of the lower bound lb_(RR) _(T) is based on thedifference between SOC and the lower limit on the setpoint tolerancerange (i.e., SOC−SOC_(sp)+SOC_(tol)) multiplied by a gain valueSOC_(gain).

Referring now to FIG. 9C, several steps 934-946 of process 900 areshown, according to an exemplary embodiment. Steps 934-946 may beperformed in response to detecting a ramp-up condition in step 916. Thisindicates that both the upper bound ub_(RR) _(T) and lower bound lb_(RR)_(T) are negative and that ramp rate control is required to prevent thePV power output from increasing at a rate that exceeds the ramp ratecompliance limit. Steps 934-946 can be used to determine a ramp ratecontrol power û_(RR) _(T) (k) that prevents the ramp rate from exceedingthe compliance limit while maintaining the stage of charge of thebattery within a desirable range (e.g., a SOC setpoint±a tolerance).

Process 900 is shown to include determining whether the SOC of thebattery is within the desirable range (i.e., |SOC−SOC_(sp)|<SOC_(tol))(step 934) or above the desirable range (i.e., SOC−SOC_(sp)>SOC_(tol))(step 936). During a ramp-up condition, ramp rate control can beperformed by charging the battery and/or limiting the PV power at PVfield power inverter 304. A positive determination in either of steps934-936 indicates that the battery does not require charging and thatramp rate control can be performed by adjusting the power setpoint forPV field power inverter 304.

In response to a determination that the current SOC of the battery iswithin or above the desirable range (i.e., the result of step 934 or 936is “yes”), process 900 proceeds to step 938. Step 938 may includedetermining whether the ramp rate would be within the compliance limitif the ramp rate control power û_(RR) _(T) (k) is set to zero. Thisdetermination can be made using the following equation:

${{{{\hat{P}}_{PV}( {k + 1} )} - {P_{PV}(k)} - {{\hat{u}}_{{RR}_{T}}( {k - 1} )}}} \leq \frac{{0.1}P_{cap}}{6{0/T}}$

where the left side of the equation represents the ramp rate with û_(RR)_(T) (k)=0 and the right side of the equation represents the ramp ratecompliance limit.

If the ramp rate control power û_(RR) _(T) (k) can be set to zerowithout violating the compliance limit (i.e., the result of step 938 is“yes”), process 900 may set û_(RR) _(T) (k)=0 (step 940). However, ifthe ramp rate control power û_(RR) _(T) (k) cannot be set to zerowithout violating the compliance limit (i.e., the result of step 938 is“no”), process 900 may set û_(RR) _(T) (k) to the maximum of the upperbound ub_(RR) _(T) and the negative battery power limit −battPowerLimit(step 942), as shown in the following equation:

${{\hat{u}}_{{RR}_{T}}(k)} = {\max \begin{pmatrix}{ub_{{RR}_{T}}} \\{- {battPowerLimit}}\end{pmatrix}}$

Still referring to FIG. 9C, process 900 is shown to include determiningwhether the state-of-charge of the battery is below the desirable range(i.e., SOC−SOC_(sp)<−SOC_(tol)) (step 944). The lower bound of thedesirable range may be defined by SOC_(sp)−SOC_(tol). If the current SOCof the battery is less than the lower bound of the desirable range, itmay be desirable to charge the battery. In response to a determinationthat the current SOC of the battery is less than the lower bound of thedesirable range (i.e., the result of step 944 is “yes”), process 900proceeds to step 946.

Step 946 may include setting the ramp rate control power û_(RR) _(T) (k)to the maximum of the negative battery power limit −battPowerLimit, thelower bound lb_(RR) _(T) , and the upper bound ub_(RR) _(T) plus afraction of the difference between the upper bound and the lower bound,as shown in the following equation:

${{\hat{u}}_{{RR}_{T}}(k)} = {\max \begin{pmatrix}{{( {{ub}_{{RR}_{T}} - {lb_{{RR}_{T}}}} )( {{SOC} - {SOC}_{sp} - {SOC}_{tol}} )( {SOC}_{gain} )} + {ub_{{RR}_{T}}}} \\{lb_{{RR}_{T}}} \\{- {battPowerLimit}}\end{pmatrix}}$

where the fraction is based on the difference between SOC and the lowerlimit of the setpoint tolerance range (i.e., SOC−SOC_(sp)−SOC_(tol))multiplied by a gain value SOC_(gain).

Referring now to FIG. 9D, several steps 948-958 of process 900 areshown, according to an exemplary embodiment. Steps 948-958 may beperformed in response to detecting a ramp-down condition in step 920.This indicates that both the upper bound ub_(RR) _(T) and lower boundlb_(RR) _(T) are positive and that ramp rate control is required toprevent the PV power output from decreasing at a rate that exceeds theramp rate compliance limit. Steps 948-958 can be used to determine aramp rate control power û_(RR) _(T) (k) that prevents the ramp rate fromexceeding the compliance limit while maintaining the stage of charge ofthe battery within a desirable range (e.g., a SOC setpoint±a tolerance).

Process 900 is shown to include determining whether the SOC of thebattery is within the desirable range (i.e., |SOC−SOC_(sp)|<SOC_(tol))(step 948) or below the desirable range (i.e., SOC−SOC_(sp)<−SOC_(tol))(step 950). During a ramp-down condition, ramp rate control can beperformed by discharging the battery. A positive determination in eitherof steps 948-950 indicates that the battery does not require dischargingto achieve the desired state-of-charge. Accordingly, ramp rate controlmay be performed by discharging as little energy as possible from thebattery in order to comply with the ramp rate limit.

In response to a determination that the current SOC of the battery iswithin or below the desirable range (i.e., the result of step 948 or 950is “yes”), process 900 proceeds to step 952. Step 952 may includesetting û_(RR) _(T) (k) to the minimum of the lower bound lb_(RR) _(T)and the battery power limit battPowerLimit, as shown in the followingequation:

${{\hat{u}}_{{RR}_{T}}(k)} = {\min \begin{pmatrix}{lb_{{RR}_{T}}} \\{battPowerLimit}\end{pmatrix}}$

In some embodiments, process 900 includes updating the default PV powersetpoint u_(PV)(k) based on the ramp rate control power û_(RR) _(T) (k)(step 954). Step 954 may include setting the PV power setpoint to thedefault value set in step 906 plus the ramp rate control power û_(RR)_(T) (k) determined in step 952, as shown in the following equation:

${u_{PV}(k)} = {{P_{PV}(k)} + \frac{{0.1}P_{Cap}}{6{0/T}} + {{\hat{u}}_{{RR}_{T}}(k)} - {\lambda \sigma}}$

Advantageously, this allows power to pass at a future instant when anup-ramp or an increase in available PV power is about to start.

Still referring to FIG. 9D, process 900 is shown to include determiningwhether the state-of-charge of the battery is above the desirable range(i.e., SOC−SOC_(sp)>SOC_(tol)) (step 956). The upper bound of thedesirable range may be defined by SOC_(sp)+SOC_(tol). If the current SOCof the battery is greater than the upper bound of the desirable range,it may be desirable to discharge the battery. In response to adetermination that the current SOC of the battery is greater than theupper bound of the desirable range (i.e., the result of step 956 is“yes”), process 900 proceeds to step 958.

Step 958 may include setting the ramp rate control power û_(RR) _(T) (k)to the minimum of the battery power limit battPowerLimit, the upperbound ub_(RR) _(T) , and the lower bound ub_(RR) _(T) plus a fraction ofthe difference between the upper bound and the lower bound, as shown inthe following equation:

${{\hat{u}}_{{RR}_{T}}(k)} = {\min \begin{pmatrix}{{( {{ub_{{RR}_{T}}} - {lb_{{RR}_{T}}}} )( {{SOC} - {SOC}_{sp} - {SOC}_{tol}} )( {SOC}_{gain} )} + {lb_{{RR}_{T}}}} \\{ub_{{RR}_{T}}} \\{battPowerLimit}\end{pmatrix}}$

where the fraction is based on the difference between SOC and the upperlimit of the setpoint tolerance range (i.e., SOC−SOC_(sp)−SOC_(tol))multiplied by a gain value SOC_(gain).

Generating Battery Power and PV Power Setpoints

Referring now to FIG. 10, a flowchart of a process 1000 for generatingbattery power setpoints and PV power setpoints is shown, according to anexemplary embodiment. Process 1000 may be performed by one or morecomponents of controller 314 (e.g., battery power setpoint generator518, PV power setpoint generator 520, etc.) to generate the batterypower setpoint u_(bat)(k) and the PV power setpoint u_(PV)(k).

Process 1000 is shown to include receiving a frequency regulationsetpoint u_(FR)(k) (step 1002) and receiving a ramp rate controlsetpoint û_(RR) _(T) (k) (step 1004). The frequency regulation setpointu_(FR)(k) may be generated by frequency regulation controller 516, asdescribed with reference to FIG. 5, and provided as an input to process1000. The ramp rate control setpoint û_(RR) _(T) (k) may be generated byramp rate controller 514 using processes 800-900, as described withreference to FIGS. 8-9.

Process 1000 is shown to include calculating a battery power setpointu_(bat)(k) (step 1006). The battery power setpoint u_(bat)(k) may begenerated by adding the frequency regulation setpoint and the ramp ratecontrol setpoint, as shown in the following equation:

u _(bat)(k)=u _(FR)(k)+û _(RR) _(T) (k)

Process 1000 is shown to include determining whether the battery powersetpoint u_(bat)(k) exceeds a battery power limit battPowerLimit (i.e.,u_(bat)(k)>battPowerLimit) (step 1012). In some embodiments, the batterypower limit is the maximum rate at which the battery can dischargestored energy. The battery power setpoint u_(bat)(k) may exceed thebattery power limit battPowerLimit when the battery cannot dischargefast enough to meet the battery power setpoint.

In response to a determination that the battery power setpointu_(bat)(k) is greater than the battery power limit battPowerLimit,(i.e., the result of step 1012 is “yes”), process 1000 may proceed tostep 1014. Step 1014 may include replacing the battery power setpointu_(batt) with the battery power limit, as shown in the followingequation:

u _(bat)(k)=battPowerLimit

In some embodiments, step 1014 includes updating the frequencyregulation setpoint to be the difference between the battery power limitand the ramp rate control setpoint, as shown in the following equation:

u _(FR)(k)=battPowerLimit−û _(RR) _(T) (k)

Process 1000 is shown to include determining whether the battery powersetpoint u_(bat)(k) is less than the negative battery power limit−battPowerLimit (i.e., u_(bat)(k)<−battPowerLimit) (step 1008). In someembodiments, the negative battery power limit is the maximum rate atwhich the battery can charge. The battery power setpoint u_(bat)(k) maybe less than the negative battery power limit −battPowerLimit when thebattery cannot charge fast enough to meet the battery power setpoint.

In response to a determination that the battery power setpointu_(bat)(k) is less than the negative battery power limit−battPowerLimit, (i.e., the result of step 1008 is “yes”), process 1000may proceed to step 1010. Step 1010 may include replacing the batterypower setpoint u_(batt) with the negative battery power limit, as shownin the following equation:

u _(bat)(k)=battPowerLimit

In some embodiments, step 1010 includes updating the frequencyregulation setpoint to be the difference between the negative batterypower limit and the ramp rate control setpoint, as shown in thefollowing equation:

u _(FR)(k)=−battPowerLimit−û _(RR) _(T) (k)

In some instances, the battery power setpoint u_(bat)(k) is between thenegative battery power limit and the battery power limit, as shown inthe following inequality:

−battPowerLimit≤u _(bat)(k)≤battPowerLimit

If the battery power setpoint u_(bat)(k) is between the negative batterypower limit and the battery power limit, process 1000 may proceed fromstep 1012 directly to step 1016 without performing steps 1010 or 1014.

Still referring to FIG. 10, process 1000 is shown to include receivingthe PV power setpoint u_(PV)(k) (step 1018) and calculating the powerP_(POI) (k) at the point of intersection (POI) (step 1016). The POIpower P_(POI)(k) may be calculated by adding the battery poweru_(bat)(k) and the PV power setpoint u_(PV)(k), as shown in thefollowing equation:

P _(POI)(k)=u _(bat)(k)+u _(PV)(k)

Process 1000 is shown to include determining whether the POI powerP_(POI)(k) exceeds a POI power limit (i.e., P_(POI)(k)>POIPowerLimit)(step 1020). The POI power limit may be the maximum allowable power atPOI 310. In response to a determination that the POI power exceeds thePOI power limit (i.e., the result of step 1020 is “yes”), process 1000may proceed to step 1022. Step 1022 may include adjusting the PV powersetpoint u_(PV)(k) to be the difference between the POI power limit andthe battery power setpoint, as shown in the following equation:

u _(PV)(k)=POIPowerLimit−u _(bat)(k)

This ensures that the POI power (i.e., u_(bat)(k)+u_(PV)(k)) does notexceed the POI power limit.

Process 1000 is shown to include providing the battery power setpointu_(bat)(k) and the PV power setpoint u_(PV)(k) as control outputs (steps1024 and 1026). For example, the battery power setpoint u_(bat)(k) maybe provided to battery power inverter 308 for use in controlling thepower charged or discharged from battery 306. The PV power setpointu_(PV)(k) may be provided to PV field power inverter 304 for use incontrolling the power output of PV field 302.

Electrical Energy Storage System with Frequency Response Optimization

Referring now to FIG. 13, a frequency response optimization system 1300is shown, according to an exemplary embodiment. System 1300 is shown toinclude a campus 1302 and an energy grid 1304. Campus 1302 may includeone or more buildings 1316 that receive power from energy grid 1304.Buildings 1316 may include equipment or devices that consume electricityduring operation. For example, buildings 1316 may include HVACequipment, lighting equipment, security equipment, communicationsequipment, vending machines, computers, electronics, elevators, or othertypes of building equipment. In some embodiments, buildings 1316 areserved by a building management system (BMS). A BMS is, in general, asystem of devices configured to control, monitor, and manage equipmentin or around a building or building area. A BMS can include, forexample, a HVAC system, a security system, a lighting system, a firealerting system, and/or any other system that is capable of managingbuilding functions or devices. An exemplary building management systemwhich may be used to monitor and control buildings 1316 is described inU.S. patent application Ser. No. 14/717,593.

In some embodiments, campus 1302 includes a central plant 1318. Centralplant 1318 may include one or more subplants that consume resources fromutilities (e.g., water, natural gas, electricity, etc.) to satisfy theloads of buildings 1316. For example, central plant 1318 may include aheater subplant, a heat recovery chiller subplant, a chiller subplant, acooling tower subplant, a hot thermal energy storage (TES) subplant, anda cold thermal energy storage (TES) subplant, a steam subplant, and/orany other type of subplant configured to serve buildings 1316. Thesubplants may be configured to convert input resources (e.g.,electricity, water, natural gas, etc.) into output resources (e.g., coldwater, hot water, chilled air, heated air, etc.) that are provided tobuildings 1316. An exemplary central plant which may be used to satisfythe loads of buildings 1316 is described U.S. patent application Ser.No. 14/634,609, titled “High Level Central Plant Optimization” and filedFeb. 27, 2015, the entire disclosure of which is incorporated byreference herein.

In some embodiments, campus 1302 includes energy generation 1320. Energygeneration 1320 may be configured to generate energy that can be used bybuildings 1316, used by central plant 1318, and/or provided to energygrid 1304. In some embodiments, energy generation 1320 generateselectricity. For example, energy generation 1320 may include an electricpower plant, a photovoltaic energy field, or other types of systems ordevices that generate electricity. The electricity generated by energygeneration 1320 can be used internally by campus 1302 (e.g., bybuildings 1316 and/or campus 1318) to decrease the amount of electricpower that campus 1302 receives from outside sources such as energy grid1304 or battery 1308. If the amount of electricity generated by energygeneration 1320 exceeds the electric power demand of campus 1302, theexcess electric power can be provided to energy grid 1304 or stored inbattery 1308. The power output of campus 1302 is shown in FIG. 13 asP_(campus). P_(campus) may be positive if campus 1302 is outputtingelectric power or negative if campus 1302 is receiving electric power.

Still referring to FIG. 13, system 1300 is shown to include a powerinverter 1306 and a battery 1308. Power inverter 1306 may be configuredto convert electric power between direct current (DC) and alternatingcurrent (AC). For example, battery 1308 may be configured to store andoutput DC power, whereas energy grid 1304 and campus 1302 may beconfigured to consume and generate AC power. Power inverter 1306 may beused to convert DC power from battery 1308 into a sinusoidal AC outputsynchronized to the grid frequency of energy grid 1304. Power inverter1306 may also be used to convert AC power from campus 1302 or energygrid 1304 into DC power that can be stored in battery 1308. The poweroutput of battery 1308 is shown as P_(bat). P_(bat) may be positive ifbattery 1308 is providing power to power inverter 1306 or negative ifbattery 1308 is receiving power from power inverter 1306.

In some instances, power inverter 1306 receives a DC power output frombattery 1308 and converts the DC power output to an AC power output thatcan be fed into energy grid 1304. Power inverter 1306 may synchronizethe frequency of the AC power output with that of energy grid 1304(e.g., 50 Hz or 60 Hz) using a local oscillator and may limit thevoltage of the AC power output to no higher than the grid voltage. Insome embodiments, power inverter 1306 is a resonant inverter thatincludes or uses LC circuits to remove the harmonics from a simplesquare wave in order to achieve a sine wave matching the frequency ofenergy grid 1304. In various embodiments, power inverter 1306 mayoperate using high-frequency transformers, low-frequency transformers,or without transformers. Low-frequency transformers may convert the DCoutput from battery 1308 directly to the AC output provided to energygrid 1304. High-frequency transformers may employ a multi-step processthat involves converting the DC output to high-frequency AC, then backto DC, and then finally to the AC output provided to energy grid 1304.

System 1300 is shown to include a point of interconnection (POI) 1310.POI 1310 is the point at which campus 1302, energy grid 1304, and powerinverter 1306 are electrically connected. The power supplied to POI 1310from power inverter 1306 is shown as P_(sup). P_(sup) may be defined asP_(bat)+P_(loss), where P_(batt) is the battery power and P_(loss) isthe power loss in the battery system (e.g., losses in power inverter1306 and/or battery 1308). P_(sup) may be positive is power inverter1306 is providing power to POI 1310 or negative if power inverter 1306is receiving power from POI 1310. P_(campus) and P_(sup) combine at POI1310 to form P_(POI). P_(POI) may be defined as the power provided toenergy grid 1304 from POI 1310. P_(POI) may be positive if POI 1310 isproviding power to energy grid 1304 or negative if POI 1310 is receivingpower from energy grid 1304.

Still referring to FIG. 13, system 1300 is shown to include a frequencyresponse controller 1312. Controller 1312 may be configured to generateand provide power setpoints to power inverter 1306. Power inverter 1306may use the power setpoints to control the amount of power P_(sup)provided to POI 1310 or drawn from POI 1310. For example, power inverter1306 may be configured to draw power from POI 1310 and store the powerin battery 1308 in response to receiving a negative power setpoint fromcontroller 1312. Conversely, power inverter 1306 may be configured todraw power from battery 1308 and provide the power to POI 1310 inresponse to receiving a positive power setpoint from controller 1312.The magnitude of the power setpoint may define the amount of powerP_(sup) provided to or from power inverter 1306. Controller 1312 may beconfigured to generate and provide power setpoints that optimize thevalue of operating system 1300 over a time horizon.

In some embodiments, frequency response controller 1312 uses powerinverter 1306 and battery 1308 to perform frequency regulation forenergy grid 1304. Frequency regulation is the process of maintaining thestability of the grid frequency (e.g., 60 Hz in the United States). Thegrid frequency may remain stable and balanced as long as the totalelectric supply and demand of energy grid 1304 are balanced. Anydeviation from that balance may result in a deviation of the gridfrequency from its desirable value. For example, an increase in demandmay cause the grid frequency to decrease, whereas an increase in supplymay cause the grid frequency to increase. Frequency response controller1312 may be configured to offset a fluctuation in the grid frequency bycausing power inverter 1306 to supply energy from battery 1308 to energygrid 1304 (e.g., to offset a decrease in grid frequency) or store energyfrom energy grid 1304 in battery 1308 (e.g., to offset an increase ingrid frequency).

In some embodiments, frequency response controller 1312 uses powerinverter 1306 and battery 1308 to perform load shifting for campus 1302.For example, controller 1312 may cause power inverter 1306 to storeenergy in battery 1308 when energy prices are low and retrieve energyfrom battery 1308 when energy prices are high in order to reduce thecost of electricity required to power campus 1302. Load shifting mayalso allow system 1300 reduce the demand charge incurred. Demand chargeis an additional charge imposed by some utility providers based on themaximum power consumption during an applicable demand charge period. Forexample, a demand charge rate may be specified in terms of dollars perunit of power (e.g., $/kW) and may be multiplied by the peak power usage(e.g., kW) during a demand charge period to calculate the demand charge.Load shifting may allow system 1300 to smooth momentary spikes in theelectric demand of campus 1302 by drawing energy from battery 1308 inorder to reduce peak power draw from energy grid 1304, therebydecreasing the demand charge incurred.

Still referring to FIG. 13, system 1300 is shown to include an incentiveprovider 1314. Incentive provider 1314 may be a utility (e.g., anelectric utility), a regional transmission organization (RTO), anindependent system operator (ISO), or any other entity that providesincentives for performing frequency regulation. For example, incentiveprovider 1314 may provide system 1300 with monetary incentives forparticipating in a frequency response program. In order to participatein the frequency response program, system 1300 may maintain a reservecapacity of stored energy (e.g., in battery 1308) that can be providedto energy grid 1304. System 1300 may also maintain the capacity to drawenergy from energy grid 1304 and store the energy in battery 1308.Reserving both of these capacities may be accomplished by managing thestate-of-charge of battery 1308.

Frequency response controller 1312 may provide incentive provider 1314with a price bid and a capability bid. The price bid may include a priceper unit power (e.g., $/MW) for reserving or storing power that allowssystem 1300 to participate in a frequency response program offered byincentive provider 1314. The price per unit power bid by frequencyresponse controller 1312 is referred to herein as the “capabilityprice.” The price bid may also include a price for actual performance,referred to herein as the “performance price.” The capability bid maydefine an amount of power (e.g., MW) that system 1300 will reserve orstore in battery 1308 to perform frequency response, referred to hereinas the “capability bid.”

Incentive provider 1314 may provide frequency response controller 1312with a capability clearing price CP_(cap), a performance clearing priceCP_(perf), and a regulation award Reg_(award), which correspond to thecapability price, the performance price, and the capability bid,respectively. In some embodiments, CP_(cap), CP_(perf), and Reg_(award)are the same as the corresponding bids placed by controller 1312. Inother embodiments, CP_(cap), CP_(perf), and Reg_(award) may not be thesame as the bids placed by controller 1312. For example, CP_(cap),CP_(perf), and Reg_(award) may be generated by incentive provider 1314based on bids received from multiple participants in the frequencyresponse program. Controller 1312 may use CP_(cap), CP_(perf), andReg_(award) to perform frequency regulation.

Frequency response controller 1312 is shown receiving a regulationsignal from incentive provider 1314. The regulation signal may specify aportion of the regulation award Reg_(award) that frequency responsecontroller 1312 is to add or remove from energy grid 1304. In someembodiments, the regulation signal is a normalized signal (e.g., between−1 and 1) specifying a proportion of Reg_(award). Positive values of theregulation signal may indicate an amount of power to add to energy grid1304, whereas negative values of the regulation signal may indicate anamount of power to remove from energy grid 1304.

Frequency response controller 1312 may respond to the regulation signalby generating an optimal power setpoint for power inverter 1306. Theoptimal power setpoint may take into account both the potential revenuefrom participating in the frequency response program and the costs ofparticipation. Costs of participation may include, for example, amonetized cost of battery degradation as well as the energy and demandcharges that will be incurred. The optimization may be performed usingsequential quadratic programming, dynamic programming, or any otheroptimization technique.

In some embodiments, controller 1312 uses a battery life model toquantify and monetize battery degradation as a function of the powersetpoints provided to power inverter 1306. Advantageously, the batterylife model allows controller 1312 to perform an optimization that weighsthe revenue generation potential of participating in the frequencyresponse program against the cost of battery degradation and other costsof participation (e.g., less battery power available for campus 1302,increased electricity costs, etc.). An exemplary regulation signal andpower response are described in greater detail with reference to FIG.14.

Referring now to FIG. 14, a pair of frequency response graphs 1400 and1450 are shown, according to an exemplary embodiment. Graph 1400illustrates a regulation signal Reg_(signal) 1402 as a function of time.Reg_(signal) 1402 is shown as a normalized signal ranging from −1 to 1(i.e., −1≤Reg_(signal)≤1). Reg_(signal) signal 1402 may be generated byincentive provider 1314 and provided to frequency response controller1312. Reg_(signal) 1402 may define a proportion of the regulation awardReg_(award) award 1454 that controller 1312 is to add or remove fromenergy grid 1304, relative to a baseline value referred to as themidpoint b 1456. For example, if the value of Reg_(award) 1454 is 10 MW,a regulation signal value of 0.5 (i.e., Reg_(signal)=0.5) may indicatethat system 1300 is requested to add 5 MW of power at POI 1310 relativeto midpoint b (e.g., P_(POI)*=10 MW×0.5+b), whereas a regulation signalvalue of −0.3 may indicate that system 1300 is requested to remove 3 MWof power from POI 1310 relative to midpoint b (e.g., P_(POI)*=10MW×−0.3+b).

Graph 1450 illustrates the desired interconnection power P_(POI)* 1452as a function of time. P_(POI)* 1452 may be calculated by frequencyresponse controller 1312 based on Reg_(signal) 1402, Reg_(award) 1454,and a midpoint b 1456. For example, controller 1312 may calculateP_(POI)* 1452 using the following equation:

P _(POI) *=Reg _(award) ×Reg _(signal) +b

where P_(POI)* represents the desired power at POI 1310 (e.g.,P_(POI)*=P_(sup)+P_(campus)) and b is the midpoint. Midpoint b may bedefined (e.g., set or optimized) by controller 1312 and may representthe midpoint of regulation around which the load is modified in responseto Reg_(signal) 1402. Optimal adjustment of midpoint b may allowcontroller 1312 to actively participate in the frequency response marketwhile also taking into account the energy and demand charge that will beincurred.

In order to participate in the frequency response market, controller1312 may perform several tasks. Controller 1312 may generate a price bid(e.g., $/MW) that includes the capability price and the performanceprice. In some embodiments, controller 1312 sends the price bid toincentive provider 1314 at approximately 15:30 each day and the pricebid remains in effect for the entirety of the next day. Prior tobeginning a frequency response period, controller 1312 may generate thecapability bid (e.g., MW) and send the capability bid to incentiveprovider 1314. In some embodiments, controller 1312 generates and sendsthe capability bid to incentive provider 1314 approximately 1.5 hoursbefore a frequency response period begins. In an exemplary embodiment,each frequency response period has a duration of one hour; however, itis contemplated that frequency response periods may have any duration.

At the start of each frequency response period, controller 1312 maygenerate the midpoint b around which controller 1312 plans to performfrequency regulation. In some embodiments, controller 1312 generates amidpoint b that will maintain battery 1308 at a constant state-of-charge(SOC) (i.e. a midpoint that will result in battery 1308 having the sameSOC at the beginning and end of the frequency response period). In otherembodiments, controller 1312 generates midpoint b using an optimizationprocedure that allows the SOC of battery 1308 to have different valuesat the beginning and end of the frequency response period. For example,controller 1312 may use the SOC of battery 1308 as a constrainedvariable that depends on midpoint b in order to optimize a valuefunction that takes into account frequency response revenue, energycosts, and the cost of battery degradation. Exemplary processes forcalculating and/or optimizing midpoint b under both the constant SOCscenario and the variable SOC scenario are described in detail in U.S.Provisional Patent Application No. 62/239,233 filed Oct. 8, 2015, theentire disclosure of which is incorporated by reference herein.

During each frequency response period, controller 1312 may periodicallygenerate a power setpoint for power inverter 1306. For example,controller 1312 may generate a power setpoint for each time step in thefrequency response period. In some embodiments, controller 1312generates the power setpoints using the equation:

P _(POI) *=Reg _(award) ×Reg _(signal) +b

where P_(POI)*=P_(sup)+P_(campus) Positive values of P_(POI)* indicateenergy flow from POI 1310 to energy grid 1304. Positive values ofP_(sup) and P_(campus) indicate energy flow to POI 1310 from powerinverter 1306 and campus 1302, respectively. In other embodiments,controller 1312 generates the power setpoints using the equation:

P _(POI) *=Reg _(award) ×Res _(FR) +b

where Res_(FR) is an optimal frequency response generated by optimizinga value function. Controller 1312 may subtract P_(campus) from P_(POI)*to generate the power setpoint for power inverter 1306 (i.e.,P_(sup)=P_(POI)*−P_(campus)) The power setpoint for power inverter 1306indicates the amount of power that power inverter 1306 is to add to POI1310 (if the power setpoint is positive) or remove from POI 1310 (if thepower setpoint is negative). Exemplary processes for calculating powerinverter setpoints are described in detail in U.S. Provisional PatentApplication No. 62/239,233.

Frequency Response Controller

Referring now to FIG. 15, a block diagram illustrating frequencyresponse controller 1312 in greater detail is shown, according to anexemplary embodiment. Frequency response controller 1312 may beconfigured to perform an optimization process to generate values for thebid price, the capability bid, and the midpoint b. In some embodiments,frequency response controller 1312 generates values for the bids and themidpoint b periodically using a predictive optimization scheme (e.g.,once every half hour, once per frequency response period, etc.).Controller 1312 may also calculate and update power setpoints for powerinverter 1306 periodically during each frequency response period (e.g.,once every two seconds).

In some embodiments, the interval at which controller 1312 generatespower setpoints for power inverter 1306 is significantly shorter thanthe interval at which controller 1312 generates the bids and themidpoint b. For example, controller 1312 may generate values for thebids and the midpoint b every half hour, whereas controller 1312 maygenerate a power setpoint for power inverter 1306 every two seconds. Thedifference in these time scales allows controller 1312 to use a cascadedoptimization process to generate optimal bids, midpoints b, and powersetpoints.

In the cascaded optimization process, a high level controller 1512determines optimal values for the bid price, the capability bid, and themidpoint b by performing a high level optimization. High levelcontroller 1512 may select midpoint b to maintain a constantstate-of-charge in battery 1308 (i.e., the same state-of-charge at thebeginning and end of each frequency response period) or to vary thestate-of-charge in order to optimize the overall value of operatingsystem 1300 (e.g., frequency response revenue minus energy costs andbattery degradation costs). High level controller 1512 may alsodetermine filter parameters for a signal filter (e.g., a low passfilter) used by a low level controller 1514.

Low level controller 1514 uses the midpoint b and the filter parametersfrom high level controller 1512 to perform a low level optimization inorder to generate the power setpoints for power inverter 1306.Advantageously, low level controller 1514 may determine how closely totrack the desired power P_(POI)* at the point of interconnection 1310.For example, the low level optimization performed by low levelcontroller 1514 may consider not only frequency response revenue butalso the costs of the power setpoints in terms of energy costs andbattery degradation. In some instances, low level controller 1514 maydetermine that it is deleterious to battery 1308 to follow theregulation exactly and may sacrifice a portion of the frequency responserevenue in order to preserve the life of battery 1308. The cascadedoptimization process is described in greater detail below.

Still referring to FIG. 15, frequency response controller 1312 is shownto include a communications interface 1502 and a processing circuit1504. Communications interface 1502 may include wired or wirelessinterfaces (e.g., jacks, antennas, transmitters, receivers,transceivers, wire terminals, etc.) for conducting data communicationswith various systems, devices, or networks. For example, communicationsinterface 1502 may include an Ethernet card and port for sending andreceiving data via an Ethernet-based communications network and/or aWiFi transceiver for communicating via a wireless communicationsnetwork. Communications interface 1502 may be configured to communicatevia local area networks or wide area networks (e.g., the Internet, abuilding WAN, etc.) and may use a variety of communications protocols(e.g., BACnet, IP, LON, etc.).

Communications interface 1502 may be a network interface configured tofacilitate electronic data communications between frequency responsecontroller 1312 and various external systems or devices (e.g., campus1302, energy grid 1304, power inverter 1306, incentive provider 1314,utilities 1520, weather service 1522, etc.). For example, frequencyresponse controller 1312 may receive inputs from incentive provider 1314indicating an incentive event history (e.g., past clearing prices,mileage ratios, participation requirements, etc.) and a regulationsignal. Controller 1312 may receive a campus power signal from campus1302, utility rates from utilities 1520, and weather forecasts fromweather service 1522 via communications interface 1502. Controller 1312may provide a price bid and a capability bid to incentive provider 1314and may provide power setpoints to power inverter 1306 viacommunications interface 1502.

Still referring to FIG. 15, processing circuit 1504 is shown to includea processor 1506 and memory 1508. Processor 1506 may be a generalpurpose or specific purpose processor, an application specificintegrated circuit (ASIC), one or more field programmable gate arrays(FPGAs), a group of processing components, or other suitable processingcomponents. Processor 1506 may be configured to execute computer code orinstructions stored in memory 1508 or received from other computerreadable media (e.g., CDROM, network storage, a remote server, etc.).

Memory 1508 may include one or more devices (e.g., memory units, memorydevices, storage devices, etc.) for storing data and/or computer codefor completing and/or facilitating the various processes described inthe present disclosure. Memory 1508 may include random access memory(RAM), read-only memory (ROM), hard drive storage, temporary storage,non-volatile memory, flash memory, optical memory, or any other suitablememory for storing software objects and/or computer instructions. Memory1508 may include database components, object code components, scriptcomponents, or any other type of information structure for supportingthe various activities and information structures described in thepresent disclosure. Memory 1508 may be communicably connected toprocessor 1506 via processing circuit 1504 and may include computer codefor executing (e.g., by processor 1506) one or more processes describedherein.

Still referring to FIG. 15, frequency response controller 1312 is shownto include a load/rate predictor 1510. Load/rate predictor 1510 may beconfigured to predict the electric load of campus 1302 (i.e.,{circumflex over (P)}_(campus)) for each time step k (e.g., k=1 . . . n)within an optimization window. Load/rate predictor 1510 is shownreceiving weather forecasts from a weather service 1522. In someembodiments, load/rate predictor 1510 predicts {circumflex over(P)}_(campus) as a function of the weather forecasts. In someembodiments, load/rate predictor 1510 uses feedback from campus 1302 topredict {circumflex over (P)}_(campus). Feedback from campus 1302 mayinclude various types of sensory inputs (e.g., temperature, flow,humidity, enthalpy, etc.) or other data relating to buildings 1316,central plant 1318, and/or energy generation 1320 (e.g., inputs from aHVAC system, a lighting control system, a security system, a watersystem, a PV energy system, etc.). Load/rate predictor 1510 may predictone or more different types of loads for campus 1302. For example,load/rate predictor 1510 may predict a hot water load, a cold waterload, and/or an electric load for each time step k within theoptimization window.

In some embodiments, load/rate predictor 1510 receives a measuredelectric load and/or previous measured load data from campus 1302. Forexample, load/rate predictor 1510 is shown receiving a campus powersignal from campus 1302. The campus power signal may indicate themeasured electric load of campus 1302. Load/rate predictor 1510 maypredict one or more statistics of the campus power signal including, forexample, a mean campus power μ_(campus) and a standard deviation of thecampus power σ_(campus). Load/rate predictor 1510 may predict{circumflex over (P)}_(campus) as a function of a given weather forecast({circumflex over (ϕ)}_(w)), a day type (clay), the time of day (t), andprevious measured load data (Y_(k−1)). Such a relationship is expressedin the following equation:

{circumflex over (P)} _(campus)=ƒ({circumflex over (ϕ)}_(w),day,t|Y_(k−1))

In some embodiments, load/rate predictor 1510 uses a deterministic plusstochastic model trained from historical load data to predict P_(campus)Load/rate predictor 1510 may use any of a variety of prediction methodsto predict P_(campus) (e.g., linear regression for the deterministicportion and an AR model for the stochastic portion). In someembodiments, load/rate predictor 1510 makes load/rate predictions usingthe techniques described in U.S. patent application Ser. No. 14/717,593.

Load/rate predictor 1510 is shown receiving utility rates from utilities1520. Utility rates may indicate a cost or price per unit of a resource(e.g., electricity, natural gas, water, etc.) provided by utilities 1520at each time step k in the optimization window. In some embodiments, theutility rates are time-variable rates. For example, the price ofelectricity may be higher at certain times of day or days of the week(e.g., during high demand periods) and lower at other times of day ordays of the week (e.g., during low demand periods). The utility ratesmay define various time periods and a cost per unit of a resource duringeach time period. Utility rates may be actual rates received fromutilities 1520 or predicted utility rates estimated by load/ratepredictor 1510.

In some embodiments, the utility rates include demand charges for one ormore resources provided by utilities 1520. A demand charge may define aseparate cost imposed by utilities 1520 based on the maximum usage of aparticular resource (e.g., maximum energy consumption) during a demandcharge period. The utility rates may define various demand chargeperiods and one or more demand charges associated with each demandcharge period. In some instances, demand charge periods may overlappartially or completely with each other and/or with the predictionwindow. Advantageously, frequency response controller 1312 may beconfigured to account for demand charges in the high level optimizationprocess performed by high level controller 1512. Utilities 1520 may bedefined by time-variable (e.g., hourly) prices, a maximum service level(e.g., a maximum rate of consumption allowed by the physicalinfrastructure or by contract) and, in the case of electricity, a demandcharge or a charge for the peak rate of consumption within a certainperiod. Load/rate predictor 1510 may store the predicted campus power{circumflex over (P)}_(campus) and the utility rates in memory 1508and/or provide the predicted campus power {circumflex over (P)}_(campus)and the utility rates to high level controller 1512.

Still referring to FIG. 15, frequency response controller 1312 is shownto include an energy market predictor 1516 and a signal statisticspredictor 1518. Energy market predictor 1516 may be configured topredict energy market statistics relating to the frequency responseprogram. For example, energy market predictor 1516 may predict thevalues of one or more variables that can be used to estimate frequencyresponse revenue. In some embodiments, the frequency response revenue isdefined by the following equation:

Rev=PS(CP_(cap)+MR·CP_(perf))Reg _(award)

where Rev is the frequency response revenue, CP_(cap) is the capabilityclearing price, MR is the mileage ratio, and CP_(perf) is theperformance clearing price. PS is a performance score based on howclosely the frequency response provided by controller 1312 tracks theregulation signal. Energy market predictor 1516 may be configured topredict the capability clearing price CP_(cap), the performance clearingprice CP_(perf), the mileage ratio MR, and/or other energy marketstatistics that can be used to estimate frequency response revenue.Energy market predictor 1516 may store the energy market statistics inmemory 1508 and/or provide the energy market statistics to high levelcontroller 1512.

Signal statistics predictor 1518 may be configured to predict one ormore statistics of the regulation signal provided by incentive provider1314. For example, signal statistics predictor 1518 may be configured topredict the mean μ_(FR), standard deviation σ_(FR), and/or otherstatistics of the regulation signal. The regulation signal statisticsmay be based on previous values of the regulation signal (e.g., ahistorical mean, a historical standard deviation, etc.) or predictedvalues of the regulation signal (e.g., a predicted mean, a predictedstandard deviation, etc.).

In some embodiments, signal statistics predictor 1518 uses adeterministic plus stochastic model trained from historical regulationsignal data to predict future values of the regulation signal. Forexample, signal statistics predictor 1518 may use linear regression topredict a deterministic portion of the regulation signal and an AR modelto predict a stochastic portion of the regulation signal. In someembodiments, signal statistics predictor 1518 predicts the regulationsignal using the techniques described in U.S. patent application Ser.No. 14/717,593. Signal statistics predictor 1518 may use the predictedvalues of the regulation signal to calculate the regulation signalstatistics. Signal statistics predictor 1518 may store the regulationsignal statistics in memory 1508 and/or provide the regulation signalstatistics to high level controller 1512.

Still referring to FIG. 15, frequency response controller 1312 is shownto include a high level controller 1512. High level controller 1512 maybe configured to generate values for the midpoint b and the capabilitybid Reg_(award). In some embodiments, high level controller 1512determines a midpoint b that will cause battery 1308 to have the samestate-of-charge (SOC) at the beginning and end of each frequencyresponse period. In other embodiments, high level controller 1512performs an optimization process to generate midpoint b and Reg_(award).For example, high level controller 1512 may generate midpoint b using anoptimization procedure that allows the SOC of battery 1308 to varyand/or have different values at the beginning and end of the frequencyresponse period. High level controller 1512 may use the SOC of battery1308 as a constrained variable that depends on midpoint b in order tooptimize a value function that takes into account frequency responserevenue, energy costs, and the cost of battery degradation. Both ofthese embodiments are described in greater detail with reference to FIG.16.

High level controller 1512 may determine midpoint b by equating thedesired power P_(POI)* at POI 1310 with the actual power at POI 1310 asshown in the following equation:

(Reg _(signal))(Reg _(award))+b=P _(bat) +P _(loss) +P _(campus)

where the left side of the equation (Reg_(signal))(Reg_(award))+b is thedesired power P_(POI)* at POI 1310 and the right side of the equation isthe actual power at POI 1310. Integrating over the frequency responseperiod results in the following equation:

${\int\limits_{period}{( {{( {Reg}_{signal} )( {Reg}_{award} )} + b} )dt}} = {\int\limits_{period}{( {P_{bat} + P_{loss} + P_{campus}} )dt}}$

For embodiments in which the SOC of battery 1308 is maintained at thesame value at the beginning and end of the frequency response period,the integral of the battery power P_(bat) over the frequency responseperiod is zero (i.e., ∫P_(bat)dt=⁰). Accordingly, the previous equationcan be rewritten as follows:

$b = {{\int\limits_{period}{P_{loss}dt}} + {\int\limits_{period}{P_{campus}{dt}}} - {{Reg}_{award}{\int\limits_{period}{{Reg}_{signal}dt}}}}$

where the term ∫P_(bat) dt has been omitted because ∫P_(bat) dt=0. Thisis ideal behavior if the only goal is to maximize frequency responserevenue. Keeping the SOC of battery 1308 at a constant value (and near50%) will allow system 1300 to participate in the frequency marketduring all hours of the day.

High level controller 1512 may use the estimated values of the campuspower signal received from campus 1302 to predict the value of∫P_(campus) dt over the frequency response period. Similarly, high levelcontroller 1512 may use the estimated values of the regulation signalfrom incentive provider 1314 to predict the value of ∫Reg_(signal) dtover the frequency response period. High level controller 1512 mayestimate the value of ∫P_(loss) dt using a Thevinin equivalent circuitmodel of battery 1308 (described in greater detail with reference toFIG. 16). This allows high level controller 1512 to estimate theintegral ∫P_(loss) dt as a function of other variables such asReg_(award), Reg_(signal), P_(campus), and midpoint b.

After substituting known and estimated values, the preceding equationcan be rewritten as follows:

${{{\frac{1}{4P_{\max}}\lbrack {{E\{ P_{campus}^{2} \}} + {{Reg}_{award}^{2}E\{ {Reg}_{signal}^{2} \}} - {2{Reg}_{award}E\{ {Reg}_{signal} \} E\{ P_{campus} \}}} \rbrack}\Delta \; t} + {\lbrack {{{Reg}_{award}E\{ {Reg}_{signal} \}} - {E\{ P_{campus} \}}} \rbrack \Delta \; t} + {{\frac{b}{2P_{\max}}\ \lbrack {{{Reg}_{award}E\{ {Reg}_{signal} \}} - {E\{ P_{campus} \}}} \rbrack}\Delta t} + {b\Delta t} + {\frac{b^{2}}{4P_{\max}}\Delta t}} = 0$

where the notation E{ } indicates that the variable within the brackets{ } is ergodic and can be approximated by the estimated mean of thevariable. For example, the term E{Reg_(signal)} can be approximated bythe estimated mean of the regulation signal μ_(FR) and the termE{P_(campus)} can be approximated by the estimated mean of the campuspower signal μ_(campus). High level controller 1512 may solve theequation for midpoint b to determine the midpoint b that maintainsbattery 1308 at a constant state-of-charge.

For embodiments in which the SOC of battery 1308 is treated as avariable, the SOC of battery 1308 may be allowed to have differentvalues at the beginning and end of the frequency response period.Accordingly, the integral of the battery power P_(bat) over thefrequency response period can be expressed as −ΔSOC·C_(des) as shown inthe following equation:

${\int\limits_{period}{P_{bat}dt}} = {{- \Delta}\; {{SOC} \cdot C_{des}}}$

where ΔSOC is the change in the SOC of battery 1308 over the frequencyresponse period and C_(des) is the design capacity of battery 1308. TheSOC of battery 1308 may be a normalized variable (i.e., 0≤SOC≤1) suchthat the term SOC·C_(des) represents the amount of energy stored inbattery 1308 for a given state-of-charge. The SOC is shown as a negativevalue because drawing energy from battery 1308 (i.e., a positiveP_(bat)) decreases the SOC of battery 1308. The equation for midpoint bbecomes:

$b = {{\int\limits_{period}{P_{loss}dt}} + {\int\limits_{period}{P_{campus}dt}} + {\int\limits_{period}{P_{bat}{dt}}} - {{Reg}_{award}{\int\limits_{period}{{Reg}_{signal}dt}}}}$

After substituting known and estimated values, the preceding equationcan be rewritten as follows:

${{{\frac{1}{4P_{\max}}\lbrack {{E\{ P_{campus}^{2} \}} + {Reg_{award}^{2}} + {E\ \{ {Reg}_{signal}^{2} \}} - {2{Reg}_{award}E\{ {Reg}_{signal} \} E\{ P_{campus} \}}} \rbrack}\Delta  t} + {\lbrack {{{Reg}_{award}E\{ {Reg}_{signal} \}} + {E\{ P_{campus} \}}} \rbrack \Delta t} + {\Delta \; {{SOC} \cdot C_{des}}} + {{\frac{b}{2P_{\max}}\ \lbrack {{{Reg}_{award}E\{ {Reg}_{signal} \}} - {E\{ P_{campus} \}}} \rbrack}\Delta t} + {b\Delta t} + {\frac{b^{2}}{4P_{\max}}\Delta t}} = 0$

High level controller 1512 may solve the equation for midpoint b interms of ΔSOC.

High level controller 1512 may perform an optimization to find optimalmidpoints b for each frequency response period within an optimizationwindow (e.g., each hour for the next day) given the electrical costsover the optimization window. Optimal midpoints b may be the midpointsthat maximize an objective function that includes both frequencyresponse revenue and costs of electricity and battery degradation. Forexample, an objective function J can be written as:

$J = {{\sum\limits_{k = 1}^{h}{{Rev}( {Reg}_{{award},k} )}} + {\sum\limits_{l = 1}^{h}{c_{k}b_{k}}} + {\min\limits_{period}( {P_{{campus},k} + b_{k}} )} - {\sum\limits_{k = 1}^{h}\lambda_{{bat},k}}}$

where Rev(Reg_(award,k)) is the frequency response revenue at time stepk, c_(k)b_(k) is the cost of electricity purchased at time step k, themin( ) term is the demand charge based on the maximum rate ofelectricity consumption during the applicable demand charge period, andλ_(bat,k) is the monetized cost battery degradation at time step k. Theelectricity cost is expressed as a positive value because drawing powerfrom energy grid 1304 is represented as a negative power and thereforewill result in negative value (i.e., a cost) in the objective function.The demand charge is expressed as a minimum for the same reason (i.e.,the most negative power value represents maximum power draw from energygrid 1304).

High level controller 1512 may estimate the frequency response revenueRev(Reg_(award,k)) as a function of the midpoints b. In someembodiments, high level controller 1512 estimates frequency responserevenue using the following equation:

Rev(Reg _(award))=Reg _(award)(CP_(cap)+MR·CP_(perf))

where CP_(cap), MR, and CP_(perf) are the energy market statisticsreceived from energy market predictor 1516 and Reg_(award) is a functionof the midpoint b. For example, high level controller 1512 may place abid that is as large as possible for a given midpoint, as shown in thefollowing equation:

Reg _(award) =P _(limit) −|b|

where P_(limit) is the power rating of power inverter 1306.Advantageously, selecting Reg_(award) as a function of midpoint b allowshigh level controller 1512 to predict the frequency response revenuethat will result from a given midpoint b.

High level controller 1512 may estimate the cost of battery degradationλ_(bat) as a function of the midpoints b. For example, high levelcontroller 1512 may use a battery life model to predict a loss inbattery capacity that will result from a set of midpoints b, poweroutputs, and/or other variables that can be manipulated by controller1312. In some embodiments, the battery life model expresses the loss inbattery capacity C_(loss,add) as a sum of multiple piecewise linearfunctions, as shown in the following equation:

C _(loss,add) =f ₁(T _(cell))+f ₂(SOC)+f ₃(DOD)+f ₄(PR)+f ₅(ER)−C_(loss,nom)

where T_(cell) is the cell temperature, SOC is the state-of-charge, DODis the depth of discharge, PR is the average power ratio (e.g.,

$ {{P\; R} = {{avg}( \frac{P}{P_{des}} )}} ),$

and ER is the average effort ratio (e.g.,

${E\; R} = {{avg}( \frac{\Delta P}{P_{des}} )}$

of battery 1308. Each of these terms is described in greater detail withreference to FIG. 16. Advantageously, several of the terms in thebattery life model depend on the midpoints b and power setpointsselected by controller 1312. This allows high level controller 1512 topredict a loss in battery capacity that will result from a given set ofcontrol outputs. High level controller 1512 may monetize the loss inbattery capacity and include the monetized cost of battery degradationλ_(bat) in the objective function J.

In some embodiments, high level controller 1512 generates a set offilter parameters for low level controller 1514. The filter parametersmay be used by low level controller 1514 as part of a low-pass filterthat removes high frequency components from the regulation signal. Insome embodiments, high level controller 1512 generates a set of filterparameters that transform the regulation signal into an optimalfrequency response signal Res_(FR). For example, high level controller1512 may perform a second optimization process to determine an optimalfrequency response Res_(FR) based on the optimized values forReg_(award) and midpoint b.

In some embodiments, high level controller 1512 determines the optimalfrequency response Res_(FR) by optimizing value function J with thefrequency response revenue Rev(Reg_(award)) defined as follows:

Rev(Reg _(award))=PS·Reg _(award)(CP_(cap)+MR·CP_(perf))

and with the frequency response Res_(FR) substituted for the regulationsignal in the battery life model. The performance score PS may be basedon several factors that indicate how well the optimal frequency responseRes_(FR) tracks the regulation signal. Closely tracking the regulationsignal may result in higher performance scores, thereby increasing thefrequency response revenue. However, closely tracking the regulationsignal may also increase the cost of battery degradation λ_(bat). Theoptimized frequency response Res_(FR) represents an optimal tradeoffbetween decreased frequency response revenue and increased battery life.High level controller 1512 may use the optimized frequency responseRes_(FR) to generate a set of filter parameters for low level controller1514. These and other features of high level controller 1512 aredescribed in greater detail with reference to FIG. 16.

Still referring to FIG. 15, frequency response controller 1312 is shownto include a low level controller 1514. Low level controller 1514 isshown receiving the midpoints b and the filter parameters from highlevel controller 1512. Low level controller 1514 may also receive thecampus power signal from campus 1302 and the regulation signal fromincentive provider 1314. Low level controller 1514 may use theregulation signal to predict future values of the regulation signal andmay filter the predicted regulation signal using the filter parametersprovided by high level controller 1512.

Low level controller 1514 may use the filtered regulation signal todetermine optimal power setpoints for power inverter 1306. For example,low level controller 1514 may use the filtered regulation signal tocalculate the desired interconnection power P_(POI)* using the followingequation:

P _(POI) *=Reg _(award) ·Reg _(filter) +b

where Reg_(filter) filter is the filtered regulation signal. Low levelcontroller 1514 may subtract the campus power P_(campus) from thedesired interconnection power P_(POI)* to calculate the optimal powersetpoints P_(SP) for power inverter 1306, as shown in the followingequation:

P _(SP) =P _(POI) *−P _(campus)

In some embodiments, low level controller 1514 performs an optimizationto determine how closely to track P_(POI)*. For example, low levelcontroller 1514 may determine an optimal frequency response Res_(FR) byoptimizing value function J with the frequency response revenueRev(Reg_(award)) defined as follows:

Rev(Reg _(award))=PS·Reg _(award)(CP_(cap)+MR·CP_(perf))

and with the frequency response Res_(FR) substituted for the regulationsignal in the battery life model. Low level controller 1514 may use theoptimal frequency response Res_(FR) in place of the filtered frequencyresponse Reg_(filter) to calculate the desired interconnection powerP_(POI)* and power setpoints P_(SP) as previously described. These andother features of low level controller 1514 are described in greaterdetail with reference to FIG. 17.

High Level Controller

Referring now to FIG. 16, a block diagram illustrating high levelcontroller 1512 in greater detail is shown, according to an exemplaryembodiment. High level controller 1512 is shown to include a constantstate-of-charge (SOC) controller 1602 and a variable SOC controller1608. Constant SOC controller 1602 may be configured to generate amidpoint b that results in battery 1308 having the same SOC at thebeginning and the end of each frequency response period. In other words,constant SOC controller 1608 may determine a midpoint b that maintainsbattery 1308 at a predetermined SOC at the beginning of each frequencyresponse period. Variable SOC controller 1608 may generate midpoint busing an optimization procedure that allows the SOC of battery 1308 tohave different values at the beginning and end of the frequency responseperiod. In other words, variable SOC controller 1608 may determine amidpoint b that results in a net change in the SOC of battery 1308 overthe duration of the frequency response period.

Constant State-of-Charge Controller

Constant SOC controller 1602 may determine midpoint b by equating thedesired power P_(POI)* at POI 1310 with the actual power at POI 1310 asshown in the following equation:

(Reg _(signal))(Reg _(award))+b=P _(bat) +P _(loss) +P _(campus)

where the left side of the equation (Reg_(signal))(Reg_(award))+b is thedesired power P_(POI)* at POI 1310 and the right side of the equation isthe actual power at POI 1310. Integrating over the frequency responseperiod results in the following equation:

${\int\limits_{period}{( {{( {Reg}_{signal} )( {Reg}_{award} )} + b} )dt}} = {\int\limits_{period}{( {P_{bat} + P_{loss} + P_{campus}} )dt}}$

Since the SOC of battery 1308 is maintained at the same value at thebeginning and end of the frequency response period, the integral of thebattery power P_(bat) over the frequency response period is zero (i.e.,∫P_(bat)dt=0). Accordingly, the previous equation can be rewritten asfollows:

$b = {{\int\limits_{period}{P_{loss}dt}} + {\int\limits_{period}{P_{campus}{dt}}} - {{Reg}_{award}{\int\limits_{period}{{Reg}_{signal}dt}}}}$

where the term ∫P_(bat) dt has been omitted because ∫P_(bat) dt=0. Thisis ideal behavior if the only goal is to maximize frequency responserevenue. Keeping the SOC of battery 1308 at a constant value (and near50%) will allow system 1300 to participate in the frequency marketduring all hours of the day.

Constant SOC controller 1602 may use the estimated values of the campuspower signal received from campus 1302 to predict the value off∫P_(campus) Lit over the frequency response period. Similarly, constantSOC controller 1602 may use the estimated values of the regulationsignal from incentive provider 1314 to predict the value of∫Reg_(signal) dt over the frequency response period. Reg_(award) can beexpressed as a function of midpoint b as previously described (e.g.,Reg_(award)=P_(limit)−|b|). Therefore, the only remaining term in theequation for midpoint b is the expected battery power loss ∫P_(loss).

Constant SOC controller 1602 is shown to include a battery power lossestimator 1604. Battery power loss estimator 1604 may estimate the valueoff ∫P_(loss)dt using a Thevinin equivalent circuit model of battery1308. For example, battery power loss estimator 1604 may model battery1308 as a voltage source in series with a resistor. The voltage sourcehas an open circuit voltage of V_(OC) and the resistor has a resistanceof R_(TH). An electric current I flows from the voltage source throughthe resistor.

To find the battery power loss in terms of the supplied power P_(sup),battery power loss estimator 1604 may identify the supplied powerP_(sup) as a function of the current I, the open circuit voltage V_(OC),and the resistance R_(TH) as shown in the following equation:

P _(sup) =V _(OC) I ² R _(TH)

which can be rewritten as:

${\frac{I^{2}}{I_{SC}} - I + \frac{P^{\prime}}{4}} = 0$

with the following substitutions:

${I_{SC} = \frac{V_{OC}}{R_{TH}}},{P^{\prime} = \frac{P}{P_{\max}}},{P_{\max} = \frac{V_{OC}^{2}}{4R_{TH}}}$

where P is the supplied power and P_(max) is the maximum possible powertransfer.

Battery power loss estimator 1604 may solve for the current I asfollows:

$I = {\frac{I_{SC}}{2}( {1 - \sqrt{1 - P^{\prime}}} )}$

which can be converted into an expression for power loss P_(loss) interms of the supplied power P and the maximum possible power transferP_(max) as shown in the following equation:

P _(loss) =P _(max)(1−√{square root over (1−P′)})²

Battery power loss estimator 1604 may simplify the previous equation byapproximating the expression (1−√{square root over (1−P′)}) as a linearfunction about P′=0. This results in the following approximation forP_(loss):

$P_{loss} \approx {P_{\max}( \frac{P^{\prime}}{2} )}^{2}$

which is a good approximation for powers up to one-fifth of the maximumpower.

Battery power loss estimator 1604 may calculate the expected value of∫P_(loss) dt over the frequency response period as follows:

${\int\limits_{period}{P_{loss}dt}} = {{\int\limits_{period}{{- {P_{\max}( \frac{{{Reg}_{award}{Reg}_{signal}} + b - P_{campus}}{2P_{\max}} )}^{2}}{dt}}} = {{{\frac{1}{4P_{\max}}\lbrack {{2{Reg}_{award}{\int\limits_{period}{P_{campus}{Reg}_{signal}{dt}}}} - {\int\limits_{period}{P_{campus}^{2}{dt}}} - {{Reg}_{award}^{2}{\int\limits_{period}{{Reg}_{signal}^{2}{dt}}}}} \rbrack} + {\frac{b}{2P_{\max}}\lbrack {{\int\limits_{period}{P_{campus}^{2}{dt}}} - {{Reg}_{award}{\int\limits_{period}{{Reg}_{signal}{dt}}}}} \rbrack} - {\frac{b^{2}}{4P_{\max}}\Delta \; t}} = {{{\frac{1}{4P_{\max}}\lbrack {{E\{ P_{campus}^{2} \}} + {Reg_{award}^{2}E\{ {Reg}_{signal}^{2} \}} - {2{Reg}_{award}E\{ {Reg}_{signal} \} E\{ P_{campus} \}}} \rbrack}\Delta \; t} - {{\frac{b}{2P_{\max}}\lbrack {{{Reg}_{award}E\{ {Reg}_{signal} \}} - {E\{ P_{campus} \}}} \rbrack}\Delta t} - {\frac{b^{2}}{4P_{\max}}\Delta \; t}}}}$

where the notation E{ } indicates that the variable within the brackets{ } is ergodic and can be approximated by the estimated mean of thevariable. This formulation allows battery power loss estimator 1604 toestimate ∫P_(loss) dt as a function of other variables such asReg_(award), Reg_(signal), P_(campus), midpoint b, and P_(max).

Constant SOC controller 1602 is shown to include a midpoint calculator1606. Midpoint calculator 1606 may be configured to calculate midpoint bby substituting the previous expression for ∫P_(loss) dt into theequation for midpoint b. After substituting known and estimated values,the equation for midpoint b can be rewritten as follows:

${{{\frac{1}{4P_{\max}}\lbrack {{E\{ P_{campus}^{2} \}} + {{Reg}_{award}^{2}E\{ {Reg}_{signal}^{2} \}} - {2{Reg}_{award}E\{ {Reg}_{singnal} \} E\{ P_{campus} \}}} \rbrack}\Delta \; t} + {\lbrack {{{Reg}_{award}E\{ {Reg}_{signal} \}} - {E\{ P_{campus} \}}} \rbrack \Delta \; t} + {{\frac{b}{2P_{\max}}\ \lbrack {{{Reg}_{award}E\{ {Reg}_{signal} \}} - {E\{ P_{campus} \}}} \rbrack}\Delta t} + {b\Delta t} + {\frac{b^{2}}{4P_{\max}}\Delta t}} = 0$

Midpoint calculator 1606 may solve the equation for midpoint b todetermine the midpoint b that maintains battery 1308 at a constantstate-of-charge.

Variable State-of-Charge Controller

Variable SOC controller 1608 may determine optimal midpoints b byallowing the SOC of battery 1308 to have different values at thebeginning and end of a frequency response period. For embodiments inwhich the SOC of battery 1308 is allowed to vary, the integral of thebattery power P_(bat) over the frequency response period can beexpressed as −ΔSOC·C_(des) as shown in the following equation:

${\int\limits_{period}{P_{bat}dt}} = {{- \Delta}\; {{SOC} \cdot C_{des}}}$

where ΔSOC is the change in the SOC of battery 1308 over the frequencyresponse period and C_(des) is the design capacity of battery 1308. TheSOC of battery 1308 may be a normalized variable (i.e., 0≤SOC≤1) suchthat the term SOC·C_(des) represents the amount of energy stored inbattery 1308 for a given state-of-charge. The SOC is shown as a negativevalue because drawing energy from battery 1308 (i.e., a positiveP_(bat)) decreases the SOC of battery 1308. The equation for midpoint bbecomes:

$b = {{\int\limits_{period}{P_{loss}dt}} + {\int\limits_{period}{P_{campus}dt}} + {\int\limits_{period}{P_{bat}{dt}}} - {{Reg}_{award}{\int\limits_{period}{{Reg}_{signal}dt}}}}$

Variable SOC controller 1608 is shown to include a battery power lossestimator 1610 and a midpoint optimizer 1612. Battery power lossestimator 1610 may be the same or similar to battery power lossestimator 1604. Midpoint optimizer 1612 may be configured to establish arelationship between the midpoint b and the SOC of battery 1308. Forexample, after substituting known and estimated values, the equation formidpoint b can be written as follows:

$\quad {{\frac{1}{4P_{\max}}\lbrack {{E\{ P_{campus}^{2} \}} + {Reg}_{award}^{2} + {E\ \{ {Reg}_{signal}^{2} \}} - {2{Reg}_{award}E\{ {Reg}_{signal} \} E\{ P_{campus} \}}} \rbrack}{\quad{{\Delta \; t} + {\lbrack {{{Reg}_{award}E\{ {Reg}_{signal} \}} + {E\{ P_{campus} \}}} \rbrack \Delta t} + {\Delta \; {{SOC} \cdot C_{des}}} + {\frac{b}{2P_{\max}}\ {\quad{{{\lbrack {{{Reg}_{award}E\{ {Reg}_{signal} \}} - {E\{ P_{campus} \}}} \rbrack \Delta t} + {b\Delta t} + {\frac{b^{2}}{4P_{\max}}\Delta t}} = 0}}}}}}$

Advantageously, the previous equation defines a relationship betweenmidpoint b and the change in SOC of battery 1308. Midpoint optimizer1612 may use this equation to determine the impact that different valuesof midpoint b have on the SOC in order to determine optimal midpoints b.This equation can also be used by midpoint optimizer 1612 duringoptimization to translate constraints on the SOC in terms of midpoint b.For example, the SOC of battery 1308 may be constrained between zero and1 (e.g., 0≤SOC≤1) since battery 1308 cannot be charged in excess of itsmaximum capacity or depleted below zero. Midpoint optimizer 1612 may usethe relationship between ΔSOC and midpoint b to constrain theoptimization of midpoint b to midpoint values that satisfy the capacityconstraint.

Midpoint optimizer 1612 may perform an optimization to find optimalmidpoints b for each frequency response period within the optimizationwindow (e.g., each hour for the next day) given the electrical costsover the optimization window. Optimal midpoints b may be the midpointsthat maximize an objective function that includes both frequencyresponse revenue and costs of electricity and battery degradation. Forexample, an objective function J can be written as:

$J = {{\sum\limits_{k = 1}^{h}{{Rev}( {Reg}_{{award},k} )}} + {\sum\limits_{k = 1}^{h}{c_{k}b_{k}}} + {\min\limits_{period}( {P_{{campus},k} + b_{k}} )} - {\sum\limits_{k = 1}^{h}\lambda_{{bat},k}}}$

where Rev(Reg_(award,k)) is the frequency response revenue at time stepk, c_(k)b_(k) is the cost of electricity purchased at time step k, themin( ) term is the demand charge based on the maximum rate ofelectricity consumption during the applicable demand charge period, andλ_(bat,k) is the monetized cost battery degradation at time step k.Midpoint optimizer 1612 may use input from frequency response revenueestimator 1616 (e.g., a revenue model) to determine a relationshipbetween midpoint b and Rev(Re award,k) Similarly, midpoint optimizer1612 may use input from battery degradation estimator 1618 and/orrevenue loss estimator 1620 to determine a relationship between midpointb and the monetized cost of battery degradation Δ_(bat,k).

Still referring to FIG. 16, variable SOC controller 1608 is shown toinclude an optimization constraints module 1614. Optimizationconstraints module 1614 may provide one or more constraints on theoptimization performed by midpoint optimizer 1612. The optimizationconstraints may be specified in terms of midpoint b or other variablesthat are related to midpoint b. For example, optimization constraintsmodule 1614 may implement an optimization constraint specifying that theexpected SOC of battery 1308 at the end of each frequency responseperiod is between zero and one, as shown in the following equation:

${0 \leq {{SOC}_{0} + {\sum\limits_{i = 1}^{j}{\Delta \; {SOC}_{i}}}} \leq {1\mspace{20mu} {\forall j}}} = {1\mspace{14mu} \ldots \mspace{14mu} h}$

where SOC₀ is the SOC of battery 1308 at the beginning of theoptimization window, ΔSOC_(i) is the change in SOC during frequencyresponse period i, and h is the total number of frequency responseperiods within the optimization window.

In some embodiments, optimization constraints module 1614 implements anoptimization constraint on midpoint b so that the power at POI 1310 doesnot exceed the power rating of power inverter 1306. Such a constraint isshown in the following equation:

−P _(limit) ≤b _(k) +P _(campus,max) ^((p)) ≤P _(limit)

where P_(limit) is the power rating of power inverter 1306 andP_(campus,max) ^((p)) is the maximum value of P_(campus) at confidencelevel p. This constraint could also be implemented by identifying theprobability that the sum of b_(k) and P_(campus,max) exceeds the powerinverter power rating (e.g., using a probability density function forP_(campus,max)) and limiting that probability to less than or equal to1−p.

In some embodiments, optimization constraints module 1614 implements anoptimization constraint to ensure (with a given probability) that theactual SOC of battery 1308 remains between zero and one at each timestep during the applicable frequency response period. This constraint isdifferent from the first optimization constraint which placed bounds onthe expected SOC of battery 1308 at the end of each optimization period.The expected SOC of battery 1308 can be determined deterministically,whereas the actual SOC of battery 1308 is dependent on the campus powerP_(campus) and the actual value of the regulation signal Reg_(signal) ateach time step during the optimization period. In other words, for anyvalue of Reg_(award)>0, there is a chance that battery 1308 becomesfully depleted or fully charged while maintaining the desired powerP_(POI)* at POI 1310.

Optimization constraints module 1614 may implement the constraint on theactual SOC of battery 1308 by approximating the battery power P_(bat) (arandom process) as a wide-sense stationary, correlated normallydistributed process. Thus, the SOC of battery 1308 can be considered asa random walk. Determining if the SOC would violate the constraint is anexample of a gambler's ruin problem. For example, consider a random walkdescribed by the following equation:

y _(k+1) =y _(k) +x _(k) , P(x _(k)=1)=p, P(x _(k)=1)=1−p

The probability P that y_(k) (starting at state z) will reach zero inless than n moves is given by the following equation:

$P = {2{{a^{- 1}( {2p} )}^{\frac{n - z}{2}}\lbrack {2( {1 - p} )} \rbrack}^{\frac{n + z}{2}}{\sum\limits_{v = 1}^{\frac{a}{2}}{{\cos^{n - 1}( \frac{\pi v}{a} )}{\sin ( \frac{\pi v}{a} )}{\sin ( \frac{\pi zv}{a} )}}}}$

In some embodiments, each frequency response period includesapproximately n=1800 time steps (e.g., one time step every two secondsfor an hour). Therefore, the central limit theorem applies and it ispossible to convert the autocorrelated random process for P_(bat) andthe limits on the SOC of battery 1308 into an uncorrelated randomprocess of 1 or −1 with a limit of zero.

In some embodiments, optimization constraints module 1614 converts thebattery power P_(bat) into an uncorrelated normal process driven by theregulation signal Re T_(signal). For example, consider the originalbattery power described by the following equation:

x _(k+1) =αx _(k) +e _(k) , x _(k) ˜N(μ,σ), e _(k) ˜N(μ_(e),σ_(e))

where the signal x represents the battery power P_(bat), α is anautocorrelation parameter, and e is a driving signal. In someembodiments, e represents the regulation signal Rea a signal. If thepower of the signal x is known, then the power of signal e is alsoknown, as shown in the following equations:

μ(1−α)=μ_(e)

E{x _(k) ²}(1−α)²−2αμμ_(e) =E{e _(k) ²}

E{x _(k) ²}(1−α²)−2μ²α(1−α)=E{e _(k) ²},

Additionally, the impulse response of the difference equation forx_(k+1) is:

h _(k)=α^(k) k≥0

Using convolution, x_(k) can be expressed as follows:

${x_{k} = {\sum\limits_{i = 1}^{k}{\alpha^{k - i}e_{i - 1}}}}{x_{3} = {{\alpha^{2}e_{0}} + {\alpha^{1}e_{1}} + e_{2}}}{x_{q} = {{\alpha^{q - 1}e_{0}} + {\alpha^{q - 2}e_{1}} + \ldots + {\alpha \; e_{q - 2}} + e_{q - 1}}}$

A random walk driven by signal x_(k) can be defined as follows:

$y_{k} = {{\sum\limits_{j = 1}^{k}x_{j}} = {\sum\limits_{j = 1}^{k}{\sum\limits_{i = 1}^{j}{\alpha^{j - 1}e_{i - 1}}}}}$

which for large values of j can be approximated using the infinite sumof a geometric series in terms of the uncorrelated signal e rather thanx:

${y_{k} = {{{\sum\limits_{j = 1}^{k}x_{j}} \approx {\sum\limits_{j = 1}^{k}{\frac{1}{1 - \alpha}e_{j}}}} = {\sum\limits_{j = 1}^{k}{x_{j}^{\prime}\mspace{20mu} k}}}}{> >}1$

Thus, the autocorrelated driving signal x_(k) of the random walk can beconverted into an uncorrelated driving signal x_(k)′ with mean and powergiven by:

${{E\{ x_{k}^{\prime} \}} = \mu},{{E\{ ( {x_{k}^{\prime} - \mu} )^{2} \}} = {\frac{1 + \alpha}{1 - \alpha}\sigma^{2}}},{{E\{ x_{k}^{\prime 2} \}} = {{\frac{1 + \alpha}{1 - \alpha}\sigma^{2}} + \mu^{2}}},{\sigma_{x^{\prime}}^{2} = {\frac{1 + \alpha}{1 - \alpha}\sigma^{2}}}$

where x_(k)′ represents the regulation signal Reg_(signal).Advantageously, this allows optimization constraints module 1614 todefine the probability of ruin in terms of the regulation signalReg_(signal).

In some embodiments, optimization constraints module 1614 determines aprobability p that the random walk driven by the sequence of −1 and 1will take the value of 1. In order to ensure that the random walk drivenby the sequence of −1 and 1 will behave the same as the random walkdriven by x_(k)′, optimization constraints module 1614 may select p suchthat the ratio of the mean to the standard deviation is the same forboth driving functions, as shown in the following equations:

$\frac{mean}{stdev} = {\frac{\mu}{\sqrt{\frac{1 + \alpha}{1 - \alpha}\sigma}} = {\overset{\sim}{\mu} = \frac{{2p} - 1}{\sqrt{4{p( {1 - p} )}}}}}$$p = {\frac{1}{2} \pm {\frac{1}{2}\sqrt{1 - ( \frac{1}{{\overset{\sim}{\mu}}^{2} + 1} )}}}$

where {tilde over (μ)} is the ratio of the mean to the standarddeviation of the driving signal (e.g., Reg_(signal)) and μ is the changein state-of-charge over the frequency response period divided by thenumber of time steps within the frequency response period (i.e.,

$ {\mu = \frac{\Delta \; {SOC}}{n}} ).$

For embodiments in which each frequency response period has a durationof one hour (i.e., 3600 seconds) and the interval between time steps istwo seconds, the number of time steps per frequency response period is1800 (i.e., n=1800). In the equation for p, the plus is used when {tildeover (μ)} is greater than zero, whereas the minus is used when {tildeover (μ)} is less than zero. Optimization constraints module 1614 mayalso ensure that both driving functions have the same number of standarddeviations away from zero (or ruin) to ensure that both random walkshave the same behavior, as shown in the following equation:

$Z = \frac{{{SOC} \cdot C_{des}}\sqrt{4{p( {1 - p} )}}}{\sqrt{\frac{1 + \alpha}{1 - \alpha}\sigma}}$

Advantageously, the equations for p and z allow optimization constraintsmodule 1614 to define the probability of ruin P (i.e., the probabilityof battery 1308 fully depleting or reaching a fully charged state)within N time steps (n=1 . . . N) as a function of variables that areknown to high level controller 1512 and/or manipulated by high levelcontroller 1512. For example, the equation for p defines p as a functionof the mean and standard deviation of the regulation signalReg_(signal), which may be estimated by signal statistics predictor1518. The equation for z defines z as a function of the SOC of battery1308 and the parameters of the regulation signal Reg_(signal).

Optimization constraints module 1614 may use one or more of the previousequations to place constraints on ΔSOC·C_(des) and Reg_(award) given thecurrent SOC of battery 1308. For example, optimization constraintsmodule 1614 may use the mean and standard deviation of the regulationsignal Reg_(signal) to calculate p. Optimization constraints module 1614may then use p in combination with the SOC of battery 1308 to calculatez. Optimization constraints module 1614 may use p and z as inputs to theequation for the probability of ruin P. This allows optimizationconstraints module 1614 to define the probability or ruin P as afunction of the SOC of battery 1308 and the estimated statistics of theregulation signal Reg_(signal). Optimization constraints module 1614 mayimpose constraints on the SOC of battery 1308 to ensure that theprobability of ruin P within N time steps does not exceed a thresholdvalue. These constraints may be expressed as limitations on thevariables ΔSOC·C_(des) and/or Reg_(award), which are related to midpointb as previously described.

In some embodiments, optimization constraints module 1614 uses theequation for the probability of ruin P to define boundaries on thecombination of variables p and z. The boundaries represent thresholdswhen the probability of ruin P in less than N steps is greater than acritical value P_(cr) (e.g., P_(cr)=0.001). For example, optimizationconstraints module 1614 may generate boundaries that correspond to athreshold probability of battery 1308 fully depleting or reaching afully charged state during a frequency response period (e.g., in N=1800steps).

In some embodiments, optimization constraints module 1614 constrains theprobability of ruin P to less than the threshold value, which imposeslimits on potential combinations of the variables p and z. Since thevariables p and z are related to the SOC of battery 1308 and thestatistics of the regulation signal, the constraints may imposelimitations on ΔSOC·C_(des) and Reg_(award) given the current SOC ofbattery 1308. These constraints may also impose limitations on midpointb since the variables ΔSOC·C_(des) and Reg_(award) are related tomidpoint b. For example, optimization constraints module 1614 may setconstraints on the maximum bid Reg_(award) given a desired change in theSOC for battery 1308. In other embodiments, optimization constraintsmodule 1614 penalizes the objective function J given the bid Reg_(award)and the change in SOC.

Still referring to FIG. 16, variable SOC controller 1608 is shown toinclude a frequency response (FR) revenue estimator 1616. FR revenueestimator 1616 may be configured to estimate the frequency responserevenue that will result from a given midpoint b (e.g., a midpointprovided by midpoint optimizer 1612). The estimated frequency responserevenue may be used as the term Rev(Reg_(award,k)) in the objectivefunction J. Midpoint optimizer 1612 may use the estimated frequencyresponse revenue along with other terms in the objective function I todetermine an optimal midpoint b.

In some embodiments, FR revenue estimator 1616 uses a revenue model topredict frequency response revenue. An exemplary revenue model which maybe used by FR revenue estimator 1616 is shown in the following equation:

Rev(Reg _(award))=Reg _(award)(CP_(cap)+MR·CP_(perf))

where CP_(cap), MR, and CP_(perf) are the energy market statisticsreceived from energy market predictor 1516 and Reg_(award) is a functionof the midpoint b. For example, capability bid calculator 1622 maycalculate Reg_(award) using the following equation:

Reg _(award) =P _(limit) −|b|

where P_(limit) is the power rating of power inverter 1306.

As shown above, the equation for frequency response revenue used by FRrevenue estimator 1616 does not include a performance score (or assumesa performance score of 1.0). This results in FR revenue estimator 1616estimating a maximum possible frequency response revenue that can beachieved for a given midpoint b (i.e., if the actual frequency responseof controller 1312 were to follow the regulation signal exactly).However, it is contemplated that the actual frequency response may beadjusted by low level controller 1514 in order to preserve the life ofbattery 1308. When the actual frequency response differs from theregulation signal, the equation for frequency response revenue can beadjusted to include a performance score. The resulting value function Jmay then be optimized by low level controller 1514 to determine anoptimal frequency response output which considers both frequencyresponse revenue and the costs of battery degradation, as described withreference to FIG. 17.

Still referring to FIG. 16, variable SOC controller 1608 is shown toinclude a battery degradation estimator 1618. Battery degradationestimator 1618 may estimate the cost of battery degradation that willresult from a given midpoint b (e.g., a midpoint provided by midpointoptimizer 1612). The estimated battery degradation may be used as theterm λ_(bat) in the objective function J. Midpoint optimizer 1612 mayuse the estimated battery degradation along with other terms in theobjective function J to determine an optimal midpoint b.

In some embodiments, battery degradation estimator 1618 uses a batterylife model to predict a loss in battery capacity that will result from aset of midpoints b, power outputs, and/or other variables that can bemanipulated by controller 1312. The battery life model may define theloss in battery capacity C_(loss,add) as a sum of multiple piecewiselinear functions, as shown in the following equation:

C _(loss,add) =f ₁(T _(cell))+f ₂(SOC)+f ₃(DOD)+f ₄(PR)+f ₅(ER)−C_(loss,nom)

where T_(cell) is the cell temperature, SOC is the state-of-charge, DODis the depth of discharge, PR is the average power ratio (e.g.,

$ {{PR} = {{avg}( \frac{P_{avg}}{P_{des}} )}} ),$

and ER is the average effort ratio (e.g.,

${E\; R} = {{avg}( \frac{\Delta P_{bat}}{P_{des}} )}$

of battery 1308. C_(loss,nom) is the nominal loss in battery capacitythat is expected to occur over time. Therefore, C_(loss,add) representsthe additional loss in battery capacity degradation in excess of thenominal value C_(loss,nom).

Battery degradation estimator 1618 may define the terms in the batterylife model as functions of one or more variables that have known values(e.g., estimated or measured values) and/or variables that can bemanipulated by high level controller 1512. For example, batterydegradation estimator 1618 may define the terms in the battery lifemodel as functions of the regulation signal statistics (e.g., the meanand standard deviation of Reg_(signal)), the campus power signalstatistics (e.g., the mean and standard deviation of P_(campus)),Reg_(award), midpoint b, the SOC of battery 1308, and/or other variablesthat have known or controlled values.

In some embodiments, battery degradation estimator 1618 measures thecell temperature T_(cell) using a temperature sensor configured tomeasure the temperature of battery 1308. In other embodiments, batterydegradation estimator 1618 estimates or predicts the cell temperatureT_(cell) based on a history of measured temperature values. For example,battery degradation estimator 1618 may use a predictive model toestimate the cell temperature T_(cell) as a function of the batterypower P_(bat), the ambient temperature, and/or other variables that canbe measured, estimated, or controlled by high level controller 1512.

Battery degradation estimator 1618 may define the variable SOC in thebattery life model as the SOC of battery 1308 at the end of thefrequency response period. The SOC of battery 1308 may be measured orestimated based on the control decisions made by controller 1312. Forexample, battery degradation estimator 1618 may use a predictive modelto estimate or predict the SOC of battery 1308 at the end of thefrequency response period as a function of the battery power P_(bat),the midpoint b, and/or other variables that can be measured, estimated,or controlled by high level controller 1512.

Battery degradation estimator 1618 may define the average power ratio PRas the ratio of the average power output of battery 1308 (i.e., P_(avg))to the design power

${P_{des}( {{e.g.},{{P\; R} = \frac{P_{avg}}{P_{des}}}} )}.$

The average power output of battery 1308 can be defined using thefollowing equation:

P _(avg) =E{|Reg _(award) Reg _(signal) +b−P _(loss) −P _(campus)|}

where the expression (Reg_(award)Reg_(signal)+b−P_(loss)−P_(campus))represents the battery power P_(bat). The expected value of P_(avg) isgiven by:

$P_{avg} = {{\sigma_{bat}\sqrt{\frac{2}{\pi}}{\exp ( \frac{- \mu_{bat}^{2}}{2\sigma_{bat}^{2}} )}} + {{erf}( \frac{- \mu_{bat}}{\sqrt{2\sigma_{bat}^{2}}} )}}$

where μ_(bat) and σ_(bat) ² are the mean and variance of the batterypower P_(bat). The variables μ_(bat) and σ_(bat) ² may be defined asfollows:

μ_(bat) =Reg _(award) E{Reg _(signal) }+b−E{P _(loss) }E{−P _(campus)}

σ_(bat) ² =Reg _(award) ²σ_(FR) ²+σ_(campus) ²

where σ_(FR) ⁻ is the variance of Reg_(signal) signal and thecontribution of the battery power loss to the variance σ_(bat) ² isneglected.

Battery degradation estimator 1618 may define the average effort ratioER as the ratio of the average change in battery power ΔP_(avg) to thedesign power P_(des) (i.e.,

$ {{E\; R} = \frac{\Delta P_{avg}}{P_{des}}} ).$

The average change in battery power can be defined using the followingequation:

ΔP _(avg) =E{P _(bat,k) −P _(bat,k−1)}

ΔP _(avg) =E{|Reg _(award)(Reg _(signal,k) −Reg _(signal,k))−(P_(loss,k) −P _(loss,k−1))−(P _(campus,k) −P _(campus,k−1))|}

To make this calculation more tractable, the contribution due to thebattery power loss can be neglected. Additionally, the campus powerP_(campus) and the regulation signal Reg_(signal) can be assumed to beuncorrelated, but autocorrelated with first order autocorrelationparameters of α_(campus) and α, respectively. The argument inside theabsolute value in the equation for ΔP_(avg) has a mean of zero and avariance given by:

$\begin{matrix}{\sigma_{diff}^{2} = {E\{ \lbrack {{{Reg}_{award}( {{Reg}_{{signal},k} - {Reg}_{{signal},{k - 1}}} )} - ( {P_{{campus},k} - P_{{campus},{k - 1}}} )} \rbrack^{2} \}}} \\{= {E\{ {{{Reg}_{award}^{2}( {{Reg}_{{signal},k} - {Reg}_{{signal},{k - 1}}} )}^{2} - ( {P_{{campus},k} - P_{{campus},{k - 1}}} )^{2}} \}}} \\{= {{2{{Reg}_{award}^{2}( {1 - \alpha} )}\sigma_{FR}^{2}} + {2( {1 - \alpha_{campus}} )\sigma_{campus}^{2}}}}\end{matrix}$

Battery degradation estimator 1618 may define the depth of discharge DODas the maximum state-of-charge minus the minimum state-of-charge ofbattery 1308 over the frequency response period, as shown in thefollowing equation:

DOD=SOC_(max)−SOC_(min)

The SOC of battery 1308 can be viewed as a constant slope with a zeromean random walk added to it, as previously described. An uncorrelatednormal random walk with a driving signal that has zero mean has anexpected range given by:

${E\{ {\max - \min} \}} = {2\sigma \sqrt{\frac{2N}{\pi}}}$

where E{max−min} represent the depth of discharge DOD and can beadjusted for the autocorrelation of the driving signal as follows:

${E\{ {\max - \min} \}} = {2\sigma_{bat}\sqrt{\frac{1 + \alpha_{bat}}{1 - \alpha_{bat}}}\sqrt{\frac{2N}{\pi}}}$σ_(bat)² = Reg_(award)²σ_(FR)² + σ_(campus)²$\alpha_{bat} = \frac{{{Reg}_{award}^{2}\alpha \sigma_{FR}^{2}} + {\alpha_{campus}\sigma_{campus}^{2}}}{{{Reg}_{award}^{2}\sigma_{FR}^{2}} + \sigma_{campus}^{2}}$

If the SOC of battery 1308 is expected to change (i.e., is not zeromean), the following equation may be used to define the depth ofdischarge:

${E\{ {\max - \min} \}} = \{ \begin{matrix}{{R_{0} + {{c \cdot \Delta}\; {{SOC} \cdot \exp}\{ {{- \alpha}\frac{R_{0} - {\Delta \; {SOC}}}{\sigma_{bat}}} \} \ \Delta \; {SOC}}} < R_{0}} \\{{{\Delta SOC} + {{c \cdot R_{0} \cdot \exp}\{ {{- \alpha}\frac{{\Delta \; {SOC}} - R_{0}}{\sigma_{bat}}} \} \ \Delta \; {SOC}}} > R_{0}}\end{matrix} $

where R₀ is the expected range with zero expected change in thestate-of-charge. Battery degradation estimator 1618 may use the previousequations to establish a relationship between the capacity lossC_(loss,add) and the control outputs provided by controller 1312.

Still referring to FIG. 16, variable SOC controller 1608 is shown toinclude a revenue loss estimator 1620. Revenue loss estimator 1620 maybe configured to estimate an amount of potential revenue that will belost as a result of the battery capacity loss C_(loss,add) In someembodiments, revenue loss estimator 1620 converts battery capacity lossC_(loss,add) into lost revenue using the following equation:

R _(loss)=(CP_(cap)+MR·CP_(perf))C _(loss,add) P _(des)

where R_(loss) is the lost revenue over the duration of the frequencyresponse period.

Revenue loss estimator 1620 may determine a present value of the revenueloss R_(loss) using the following equation:

$\lambda_{bat} = {\lbrack \frac{1 - ( {1 + \frac{i}{n}} )^{- n}}{\frac{i}{n}} \rbrack R_{loss}}$

where n is the total number of frequency response periods (e.g., hours)during which the revenue loss occurs and λ_(bat) is the present value ofthe revenue loss during the ith frequency response period. In someembodiments, the revenue loss occurs over ten years (e.g., n=87,600hours). Revenue loss estimator 1620 may provide the present value of therevenue loss λ_(bat) to midpoint optimizer 1612 for use in the objectivefunction J.

Midpoint optimizer 1612 may use the inputs from optimization constraintsmodule 1614, FR revenue estimator 1616, battery degradation estimator1618, and revenue loss estimator 1620 to define the terms in objectivefunction J. Midpoint optimizer 1612 may determine values for midpoint bthat optimize objective function J. In various embodiments, midpointoptimizer 1612 may use sequential quadratic programming, dynamicprogramming, or any other optimization technique.

Still referring to FIG. 16, high level controller 1512 is shown toinclude a capability bid calculator 1622. Capability bid calculator 1622may be configured to generate a capability bid Reg_(award) based on themidpoint b generated by constant SOC controller 1602 and/or variable SOCcontroller 1608. In some embodiments, capability bid calculator 1622generates a capability bid that is as large as possible for a givenmidpoint, as shown in the following equation:

Reg _(award) =P _(limit) −|b|

where P_(limit) is the power rating of power inverter 1306. Capabilitybid calculator 1622 may provide the capability bid to incentive provider1314 and to frequency response optimizer 1624 for use in generating anoptimal frequency response.

Filter Parameters Optimization

Still referring to FIG. 16, high level controller 1512 is shown toinclude a frequency response optimizer 1624 and a filter parametersoptimizer 1626. Filter parameters optimizer 1626 may be configured togenerate a set of filter parameters for low level controller 1514. Thefilter parameters may be used by low level controller 1514 as part of alow-pass filter that removes high frequency components from theregulation signal Reg_(signal). In some embodiments, filter parametersoptimizer 1626 generates a set of filter parameters that transform theregulation signal Reg_(signal) into an optimal frequency response signalRes_(FR). Frequency response optimizer 1624 may perform a secondoptimization process to determine the optimal frequency responseRes_(FR) based on the values for Reg_(award) and midpoint b. In thesecond optimization, the values for Reg_(award) and midpoint b may befixed at the values previously determined during the first optimization.

In some embodiments, frequency response optimizer 1624 determines theoptimal frequency response Res_(FR) by optimizing value function J shownin the following equation:

$J = {{\sum\limits_{k = 1}^{h}{{Rev}( {Reg}_{{award},k} )}} + {\sum\limits_{k = 1}^{h}{c_{k}b_{k}}} + {\min\limits_{period}( {P_{campus} + b_{k}} )} - {\sum\limits_{k = 1}^{h}\lambda_{{bat},k}}}$

where the frequency response revenue Rev(Reg_(award)) is defined asfollows:

Rev(Reg _(award))=PS·Reg_(award)(CP_(cap)+MR·CP_(perf))

and the frequency response Res_(FR) is substituted for the regulationsignal Reg_(signal) in the battery life model used to calculateλ_(bat,k). The performance score PS may be based on several factors thatindicate how well the optimal frequency response Res_(FR) tracks theregulation signal Reg_(signal).

The frequency response Res_(FR) may affect both Rev(Reg_(award)) and themonetized cost of battery degradation λ_(bat). Closely tracking theregulation signal may result in higher performance scores, therebyincreasing the frequency response revenue. However, closely tracking theregulation signal may also increase the cost of battery degradationλ_(bat). The optimized frequency response Res_(FR) represents an optimaltradeoff between decreased frequency response revenue and increasedbattery life (i.e., the frequency response that maximizes value J).

In some embodiments, the performance score PS is a composite weightingof an accuracy score, a delay score, and a precision score. Frequencyresponse optimizer 1624 may calculate the performance score PS using theperformance score model shown in the following equation:

${PS} = {{\frac{1}{3}PS_{acc}} + {\frac{1}{3}PS_{delay}} + {\frac{1}{3}PS_{prec}}}$

where PS_(acc) is the accuracy score, PS_(delay) is the delay score, andPS_(prec) is the precision score. In some embodiments, each term in theprecision score is assigned an equal weighting (e.g., ⅓). In otherembodiments, some terms may be weighted higher than others.

The accuracy score PS_(acc) may be the maximum correlation between theregulation signal Reg_(signal) and the optimal frequency responseRes_(FR). Frequency response optimizer 1624 may calculate the accuracyscore PS_(acc) using the following equation:

${PS_{acc}} = {\max\limits_{\delta}r_{{Reg},{{Res}{(\delta)}}}}$

where δ is a time delay between zero and δ_(max) (e.g., between zero andfive minutes).

The delay score PS_(delay) may be based on the time delay δ between theregulation signal Reg_(signal) and the optimal frequency responseRes_(FR). Frequency response optimizer 1624 may calculate the delayscore PS_(delay) using the following equation:

${PS_{delay}} = | \frac{{\delta \lbrack s\rbrack} - \delta_{\max}}{\delta_{\max}} |$

where δ[s] is the time delay of the frequency response Res_(FR) relativeto the regulation signal Reg_(signal) and δ_(max) is the maximumallowable delay (e.g., 5 minutes or 300 seconds).

The precision score PS_(prec) may be based on a difference between thefrequency response Res_(FR) and the regulation signal Reg_(signal).Frequency response optimizer 1624 may calculate the precision scorePS_(prec) using the following equation:

${PS_{prec}} = {1 - \frac{\sum{{{Res}_{FR} - {Reg_{signal}}}}}{\sum{{Reg}_{signal}}}}$

Frequency response optimizer 1624 may use the estimated performancescore and the estimated battery degradation to define the terms inobjective function J. Frequency response optimizer 1624 may determinevalues for frequency response Res_(FR) that optimize objective functionJ. In various embodiments, frequency response optimizer 1624 may usesequential quadratic programming, dynamic programming, or any otheroptimization technique.

Filter parameters optimizer 1626 may use the optimized frequencyresponse Res_(FR) to generate a set of filter parameters for low levelcontroller 1514. In some embodiments, the filter parameters are used bylow level controller 1514 to translate an incoming regulation signalinto a frequency response signal. Low level controller 1514 is describedin greater detail with reference to FIG. 17.

Still referring to FIG. 16, high level controller 1512 is shown toinclude a data fusion module 1628. Data fusion module 1628 is configuredto aggregate data received from external systems and devices forprocessing by high level controller 1512. For example, data fusionmodule 1628 may store and aggregate external data such as the campuspower signal, utility rates, incentive event history and/or weatherforecasts as shown in FIG. 19. Further, data fusion module 1628 maystore and aggregate data from low level controller 1514. For example,data fusion module 1628 may receive data such as battery SOC, batterytemperature, battery system temperature data, security device statusdata, battery voltage data, battery current data and/or any other dataprovided by battery system 1804. Data fusion module 1628 is described ingreater detail with reference to FIG. 19.

Low Level Controller

Referring now to FIG. 17, a block diagram illustrating low levelcontroller 1514 in greater detail is shown, according to an exemplaryembodiment. Low level controller 1514 may receive the midpoints b andthe filter parameters from high level controller 1512. Low levelcontroller 1514 may also receive the campus power signal from campus1302 and the regulation signal Reg_(signal) and the regulation awardReg_(award) from incentive provider 1314.

Predicting and Filtering the Regulation Signal

Low level controller 1514 is shown to include a regulation signalpredictor 1702. Regulation signal predictor 1702 may use a history ofpast and current values for the regulation signal Reg_(signal) topredict future values of the regulation signal. In some embodiments,regulation signal predictor 1702 uses a deterministic plus stochasticmodel trained from historical regulation signal data to predict futurevalues of the regulation signal Reg_(signal). For example, regulationsignal predictor 1702 may use linear regression to predict adeterministic portion of the regulation signal Reg_(signal) and an ARmodel to predict a stochastic portion of the regulation signalReg_(signal). In some embodiments, regulation signal predictor 1702predicts the regulation signal Reg_(signal) using the techniquesdescribed in U.S. patent application Ser. No. 14/717,593.

Low level controller 1514 is shown to include a regulation signal filter1704. Regulation signal filter 1704 may filter the incoming regulationsignal Reg_(signal) and/or the predicted regulation signal using thefilter parameters provided by high level controller 1512. In someembodiments, regulation signal filter 1704 is a low pass filterconfigured to remove high frequency components from the regulationsignal Reg_(signal). Regulation signal filter 1704 may provide thefiltered regulation signal to power setpoint optimizer 1706.

Determining Optimal Power Setpoints

Power setpoint optimizer 1706 may be configured to determine optimalpower setpoints for power inverter 1306 based on the filtered regulationsignal. In some embodiments, power setpoint optimizer 1706 uses thefiltered regulation signal as the optimal frequency response. Forexample, low level controller 1514 may use the filtered regulationsignal to calculate the desired interconnection power P_(POI)* using thefollowing equation:

P _(POI) *=Reg _(award) ·Reg _(filter) +b

where Reg_(filter) is the filtered regulation signal. Power setpointoptimizer 1706 may subtract the campus power P_(campus) from the desiredinterconnection power P_(POI)* to calculate the optimal power setpointsP_(SP) for power inverter 1306, as shown in the following equation:

P _(SP) =P _(POI) *−P _(campus)

In other embodiments, low level controller 1514 performs an optimizationto determine how closely to track P_(POI)*. For example, low levelcontroller 1514 is shown to include a frequency response optimizer 1708.Frequency response optimizer 1708 may determine an optimal frequencyresponse Res_(FR) by optimizing value function J shown in the followingequation:

$J = {{\sum\limits_{k = 1}^{h}{{Rev}( {Reg}_{{award},k} )}} + {\sum\limits_{k = 1}^{h}{c_{k}b_{k}}} + {\min\limits_{period}( {P_{{campus},k} + b_{k}} )} - {\sum\limits_{k = 1}^{h}\lambda_{{bat},k}}}$

where the frequency response Res_(FR) affects both Rev(Reg_(award)) andthe monetized cost of battery degradation λ_(bat). The frequencyresponse Res_(FR) may affect both Rev(Re a award) and the monetized costof battery degradation λ_(bat). The optimized frequency responseRes_(FR) represents an optimal tradeoff between decreased frequencyresponse revenue and increased battery life (i.e., the frequencyresponse that maximizes value J). The values of Rev(Reg_(award)) andλ_(bat,k) may be calculated by FR revenue estimator 1710, performancescore calculator 1712, battery degradation estimator 1714, and revenueloss estimator 1716.

Estimating Frequency Response Revenue

Still referring to FIG. 17, low level controller 1514 is shown toinclude a FR revenue estimator 1710. FR revenue estimator 1710 mayestimate a frequency response revenue that will result from thefrequency response Res_(FR). In some embodiments, FR revenue estimator1710 estimates the frequency response revenue using the followingequation:

Rev(Reg _(award))=PS·Reg _(award)(CP_(cap)+MR·CP_(perf))

where Reg_(award), CP_(cap), MR, and CP_(perf) are provided as knowninputs and PS is the performance score.

Low level controller 1514 is shown to include a performance scorecalculator 1712. Performance score calculator 1712 may calculate theperformance score PS used in the revenue function. The performance scorePS may be based on several factors that indicate how well the optimalfrequency response Res_(FR) tracks the regulation signal Reg_(signal).In some embodiments, the performance score PS is a composite weightingof an accuracy score, a delay score, and a precision score. Performancescore calculator 1712 may calculate the performance score PS using theperformance score model shown in the following equation:

${PS} = {{\frac{1}{3}PS_{acc}} + {\frac{1}{3}PS_{delay}} + {\frac{1}{3}PS_{prec}}}$

where PS_(acc) is the accuracy score, PS_(delay) is the delay score, andPS_(prec) is the precision score. In some embodiments, each term in theprecision score is assigned an equal weighting (e.g., ⅓). In otherembodiments, some terms may be weighted higher than others. Each of theterms in the performance score model may be calculated as previouslydescribed with reference to FIG. 16.

Estimating Battery Degradation

Still referring to FIG. 17, low level controller 1514 is shown toinclude a battery degradation estimator 1714. Battery degradationestimator 1714 may be the same or similar to battery degradationestimator 1618, with the exception that battery degradation estimator1714 predicts the battery degradation that will result from thefrequency response Res_(FR) rather than the original regulation signalReg_(signal). The estimated battery degradation may be used as the termλ_(batt) in the objective function J. Frequency response optimizer 1708may use the estimated battery degradation along with other terms in theobjective function J to determine an optimal frequency responseRes_(FR).

In some embodiments, battery degradation estimator 1714 uses a batterylife model to predict a loss in battery capacity that will result fromthe frequency response Res_(FR). The battery life model may define theloss in battery capacity C_(loss,add) as a sum of multiple piecewiselinear functions, as shown in the following equation:

C _(loss,add) =f ₁(T _(cell))+f ₂(SOC)+f ₃(DOD)+f ₄(PR)+f ₅(ER)−C_(loss,nom)

where T_(cell) is the cell temperature, SOC is the state-of-charge, DODis the depth of discharge, PR is the average power ratio (e.g.,

$ {{PR} = {av{g( \frac{P_{avg}}{P_{des}} )}}} ),$

and ER is the average effort (e.g.,

${E\; R} = {{avg}( \frac{\Delta P_{bat}}{P_{des}} )}$

of battery 1308. C_(loss,nom) is the nominal loss in battery capacitythat is expected to occur over time. Therefore, C_(loss,add) representsthe additional loss in battery capacity degradation in excess of thenominal value C_(loss,nom). The terms in the battery life model may becalculated as described with reference to FIG. 16, with the exceptionthat the frequency response Res_(FR) is used in place of the regulationsignal Reg_(signal).

Still referring to FIG. 17, low level controller 1514 is shown toinclude a revenue loss estimator 1716. Revenue loss estimator 1716 maybe the same or similar to revenue loss estimator 1620, as described withreference to FIG. 16. For example, revenue loss estimator 1716 may beconfigured to estimate an amount of potential revenue that will be lostas a result of the battery capacity loss C_(loss,add). In someembodiments, revenue loss estimator 1716 converts battery capacity lossC_(loss,add) into lost revenue using the following equation:

R _(loss)=(CP_(cap)+MR·CP_(perf))C _(loss,add) P _(des)

where R_(loss) is the lost revenue over the duration of the frequencyresponse period.

Revenue loss estimator 1620 may determine a present value of the revenueloss R_(loss) using the following equation:

$\lambda_{bat} = {\lbrack \frac{1 - ( {1 + \frac{i}{n}} )^{- n}}{\frac{i}{n}} \rbrack R_{loss}}$

where n is the total number of frequency response periods (e.g., hours)during which the revenue loss occurs and λ_(bat) is the present value ofthe revenue loss during the ith frequency response period. In someembodiments, the revenue loss occurs over ten years (e.g., n=87,600hours). Revenue loss estimator 1620 may provide the present value of therevenue loss λ_(bat) to frequency response optimizer 1708 for use in theobjective function J.

Frequency response optimizer 1708 may use the estimated performancescore and the estimated battery degradation to define the terms inobjective function J. Frequency response optimizer 1708 may determinevalues for frequency response Res_(FR) that optimize objective functionJ. In various embodiments, frequency response optimizer 1708 may usesequential quadratic programming, dynamic programming, or any otheroptimization technique.

Frequency Response Control System

Referring now to FIG. 18, a block diagram of a frequency responsecontrol system 1800 is shown, according to exemplary embodiment. Controlsystem 1800 is shown to include frequency response controller 1312,which may be the same or similar as previously described. For example,frequency response controller 1312 may be configured to perform anoptimization process to generate values for the bid price, thecapability bid, and the midpoint b. In some embodiments, frequencyresponse controller 1312 generates values for the bids and the midpointb periodically using a predictive optimization scheme (e.g., once everyhalf hour, once per frequency response period, etc.). Frequency responsecontroller 1312 may also calculate and update power setpoints for powerinverter 1306 periodically during each frequency response period (e.g.,once every two seconds). As shown in FIG. 18, frequency responsecontroller 1312 is in communication with one or more external systemsvia communication interface 1802. Additionally, frequency responsecontroller 1312 is also shown as being in communication with a batterysystem 1804.

In some embodiments, the interval at which frequency response controller1312 generates power setpoints for power inverter 1306 is significantlyshorter than the interval at which frequency response controller 1312generates the bids and the midpoint b. For example, frequency responsecontroller 1312 may generate values for the bids and the midpoint bevery half hour, whereas frequency response controller 1312 may generatea power setpoint for power inverter 1306 every two seconds. Thedifference in these time scales allows frequency response controller1312 to use a cascaded optimization process to generate optimal bids,midpoints b, and power setpoints.

In the cascaded optimization process, high level controller 1512determines optimal values for the bid price, the capability bid, and themidpoint b by performing a high level optimization. The high levelcontroller 1512 may be a centralized server within the frequencyresponse controller 1312. The high level controller 1512 may beconfigured to execute optimization control algorithms, such as thosedescribed herein. In one embodiment, the high level controller 1512 maybe configured to run an optimization engine, such as a MATLABoptimization engine.

Further, the cascaded optimization process allows for multiplecontrollers to process different portions of the optimization process.As will be described below, the high level controller 1512 may be usedto perform optimization functions based on received data, while a lowlevel controller 1514 may receive optimization data from the high levelcontroller 1512 and control the battery system 1804 accordingly. Byallowing independent platforms to perform separation portions of theoptimization, the individual platforms may be scaled and tunedindependently. For example, the controller 1312 may be able to be scaledup to accommodate a larger battery system 1804 by adding additional lowlevel controllers to control the battery system 1804. Further, the highlevel controller 1512 may be modified to provide additional computingpower for optimizing battery system 1804 in more complex systems.Further, modifications to either the high level controller 1512 or thelow level controller 1514 will not affect the other, thereby increasingoverall system stability and availability.

In system 1800, high level controller 1512 may be configured to performsome or all of the functions previously described with reference toFIGS. 15-17. For example, high level controller 1512 may select midpointb to maintain a constant state-of-charge in battery 1308 (i.e., the samestate-of-charge at the beginning and end of each frequency responseperiod) or to vary the state-of-charge in order to optimize the overallvalue of operating system 1800 (e.g., frequency response revenue minusenergy costs and battery degradation costs), as described below. Highlevel controller 1512 may also determine filter parameters for a signalfilter (e.g., a low pass filter) used by a low level controller 1514.

The low level controller 1514 may be a standalone controller. In oneembodiment, the low level controller 1514 is a Network Automation Engine(NAE) controller from Johnson Controls. However, other controllershaving the required capabilities are also contemplated. The requiredcapabilities for the low level controller 1514 may include havingsufficient memory and computing power to run the applications, describedbelow, at the required frequencies. For example, certain optimizationcontrol loops (described below) may require control loops running at 200ms intervals. However, intervals of more than 200 ms and less than 200ms may also be required. These control loops may require reading andwriting data to and from the battery inverter. The low level controller1514 may also be required to support Ethernet connectivity (or othernetwork connectivity) to connect to a network for receiving bothoperational data, as well as configuration data. The low levelcontroller 1514 may be configured to perform some or all of thefunctions previously described with reference to FIGS. 15-17.

The low level controller 1514 may be capable of quickly controlling oneor more devices around one or more setpoints. For example, low levelcontroller 1514 uses the midpoint b and the filter parameters from highlevel controller 1512 to perform a low level optimization in order togenerate the power setpoints for power inverter 1306. Advantageously,low level controller 1514 may determine how closely to track the desiredpower P_(POI)* at the point of interconnection 1310. For example, thelow level optimization performed by low level controller 1514 mayconsider not only frequency response revenue but also the costs of thepower setpoints in terms of energy costs and battery degradation. Insome instances, low level controller 1514 may determine that it isdeleterious to battery 1308 to follow the regulation exactly and maysacrifice a portion of the frequency response revenue in order topreserve the life of battery 1308.

Low level controller 1514 may also be configured to interface with oneor more other devises or systems. For example, the low level controller1514 may communicate with the power inverter 1306 and/or the batterymanagement unit 1810 via a low level controller communication interface1812. Communications interface 1812 may include wired or wirelessinterfaces (e.g., jacks, antennas, transmitters, receivers,transceivers, wire terminals, etc.) for conducting data communicationswith various systems, devices, or networks. For example, communicationsinterface 1812 may include an Ethernet card and port for sending andreceiving data via an Ethernet-based communications network and/or aWiFi transceiver for communicating via a wireless communicationsnetwork. Communications interface 1812 may be configured to communicatevia local area networks or wide area networks (e.g., the Internet, abuilding WAN, etc.) and may use a variety of communications protocols(e.g., BACnet, MODBUS, CAN, IP, LON, etc.).

As described above, the low level controller 1514 may communicatesetpoints to the power inverter 1306. Furthermore, the low levelcontroller 1514 may receive data from the battery management unit 1810via the communication interface 1812. The battery management unit 1810may provide data relating to a state of charge (SOC) of the batteries1308. The battery management unit 1810 may further provide data relatingto other parameters of the batteries 1308, such as temperature, realtime or historical voltage level values, real time or historical currentvalues, etc. The low level controller 1514 may be configured to performtime critical functions of the frequency response controller 1312. Forexample, the low level controller 1514 may be able to perform fast loop(PID, PD, PI, etc.) controls in real time.

The low level controller 1514 may further control a number of othersystems or devices associated with the battery system 1804. For example,the low level controller may control safety systems 1816 and/orenvironmental systems 1818. In one embodiment, the low level controller1514 may communicate with and control the safety systems 1816 and/or theenvironmental systems 1818 through an input/output module (TOM) 1819. Inone example, the IOM may be an TOM controller from Johnson Controls. TheIOM may be configured to receive data from the low level controller andthen output discrete control signals to the safety systems 1816 and/orenvironmental systems 1818. Further, the IOM 1819 may receive discreteoutputs from the safety systems 1816 and/or environmental systems 1520,and report those values to the low level controller 1514. For example,the TOM 1819 may provide binary outputs to the environmental system1818, such as a temperature setpoint; and in return may receive one ormore analog inputs corresponding to temperatures or other parametersassociated with the environmental systems 1818. Similarly, the safetysystems 1816 may provide binary inputs to the TOM 1819 indicating thestatus of one or more safety systems or devices within the batterysystem 1804. The IOM 1819 may be able to process multiple data pointsfrom devices within the battery system 1804. Further, the TOM may beconfigured to receive and output a variety of analog signals (4-20 mA,0-5V, etc.) as well as binary signals.

The environmental systems 1818 may include HVAC devices such as roof-topunits (RTUs), air handling units (AHUs), etc. The environmental systems1818 may be coupled to the battery system 1804 to provide environmentalregulation of the battery system 1804. For example, the environmentalsystems 1818 may provide cooling for the battery system 1804. In oneexample, the battery system 1804 may be contained within anenvironmentally sealed container. The environmental systems 1818 maythen be used to not only provide airflow through the battery system1804, but also to condition the air to provide additional cooling to thebatteries 1308 and/or the power inverter 1306. The environmental systems1818 may also provide environmental services such as air filtration,liquid cooling, heating, etc. The safety systems 1816 may providevarious safety controls and interlocks associated with the batterysystem 1804. For example, the safety systems 1816 may monitor one ormore contacts associated with access points on the battery system. Wherea contact indicates that an access point is being accessed, the safetysystems 1816 may communicate the associated data to the low levelcontroller 1514 via the IOM 1819. The low level controller may thengenerate and alarm and/or shut down the battery system 1804 to preventany injury to a person accessing the battery system 1804 duringoperation. Further examples of safety systems can include air qualitymonitors, smoke detectors, fire suppression systems, etc.

Still referring to FIG. 18, the frequency response controller 1312 isshown to include the high level controller communications interface1802. Communications interface 1802 may include wired or wirelessinterfaces (e.g., jacks, antennas, transmitters, receivers,transceivers, wire terminals, etc.) for conducting data communicationswith various systems, devices, or networks. For example, communicationsinterface 1802 may include an Ethernet card and port for sending andreceiving data via an Ethernet-based communications network and/or aWiFi transceiver for communicating via a wireless communicationsnetwork. Communications interface 1802 may be configured to communicatevia local area networks or wide area networks (e.g., the Internet, abuilding WAN, etc.) and may use a variety of communications protocols(e.g., BACnet, IP, LON, etc.).

Communications interface 1802 may be a network interface configured tofacilitate electronic data communications between frequency responsecontroller 1312 and various external systems or devices (e.g., campus1302, energy grid 1304, incentive provider 1314, utilities 1520, weatherservice 1522, etc.). For example, frequency response controller 1312 mayreceive inputs from incentive provider 1314 indicating an incentiveevent history (e.g., past clearing prices, mileage ratios, participationrequirements, etc.) and a regulation signal. Further, the incentiveprovider 1314 may communicate utility rates provided by utilities 1520.Frequency response controller 1312 may receive a campus power signalfrom campus 1302, and weather forecasts from weather service 1522 viacommunications interface 1802. Frequency response controller 1312 mayprovide a price bid and a capability bid to incentive provider 1314 andmay provide power setpoints to power inverter 1306 via communicationsinterface 1802.

Data Fusion

Turning now to FIG. 19, a block diagram illustrating data flow into thedata fusion module 1628 is shown, according to some embodiments. Asshown in FIG. 19, the data fusion module 1628 may receive data frommultiple devices and/or systems. In one embodiment, the data fusionmodule 1628 may receive all data received by the high level controller1512. For example, the data fusion module 1628 may receive campus datafrom the campus 1302. Campus data may include campus power requirements,campus power requests, occupancy planning, historical use data, lightingschedules, HVAC schedules, etc. In a further embodiment, the data fusionmodule 1628 may receive weather data from the weather service 1522. Theweather service 1522 may include current weather data (temperature,humidity, barometric pressure, etc.), weather forecasts, historicalweather data, etc. In a still further embodiment, the data fusion module1628 may receive utility data from the utilities 1520. In some examples,the data fusion module 1628 may receive some or all of the utility datavia the incentive provider 1314. Examples of utility data may includeutility rates, future pricing schedules, anticipated loading, historicaldata, etc. Further, the incentive provider 1314 may further add datasuch as capability bid requests, price bid requests, incentive data,etc.

The data fusion module 1628 may further receive data from the low levelcontroller 1514. In some embodiments, the low level controller mayreceive data from multiple sources, which may be referred tocollectively as battery system data. For example, the low levelcontroller 1514 may receive inverter data from power inverter 1306.Example inverter data may include inverter status, feedback points,inverter voltage and current, power consumption, etc. The low levelcontroller 1514 may further receive battery data from the batterymanagement unit 1810. Example battery data may include battery SOC,depth of discharge data, battery temperature, battery cell temperatures,battery voltage, historical battery use data, battery health data, etc.In other embodiment, the low level controller 1514 may receiveenvironmental data from the environmental systems 1818. Examples ofenvironmental data may include battery system temperature, batterysystem humidity, current HVAC settings, setpoint temperatures,historical HVAC data, etc. Further, the low level controller 1514 mayreceive safety system data from the safety systems 1816. Safety systemdata may include access contact information (e.g. open or closedindications), access data (e.g. who has accessed the battery system 1804over time), alarm data, etc. In some embodiments, some or all of thedata provided to the low level controller 1514 is via an input/outputmodule, such as IOM 1819. For example, the safety system data and theenvironmental system data may be provided to the low level controller1514 via an input/output module, as described in detail in regards toFIG. 18.

The low level controller 1514 may then communicate the battery systemdata to the data fusion module 1628 within the high level controller1512. Additionally, the low level controller 1514 may provide additionaldata to the data fusion module 1628, such as setpoint data, controlparameters, etc.

The data fusion module 1628 may further receive data from otherstationary power systems, such as a photovoltaic system 1902. Forexample, the photovoltaic system 1902 may include one or morephotovoltaic arrays and one or more photovoltaic array power inverters.The photovoltaic system 1902 may provide data to the data fusion module1628 such as photovoltaic array efficiency, photovoltaic array voltage,photovoltaic array inverter output voltage, photovoltaic array inverteroutput current, photovoltaic array inverter temperature, etc. In someembodiments, the photovoltaic system 1902 may provide data directly tothe data fusion module 1628 within the high level controller 1512. Inother embodiments, the photovoltaic system 1902 may transmit the data tothe low level controller 1514, which may then provide the data to thedata fusion module 1628 within the high level controller 1512.

The data fusion module 1628 may receive some or all of the datadescribed above, and aggregate the data for use by the high levelcontroller 1512. In one embodiment, the data fusion module 1628 isconfigured to receive and aggregate all data received by the high levelcontroller 1512, and to subsequently parse and distribute the data toone or more modules of the high level controller 1512, as describedabove. Further, the data fusion module 1628 may be configured to combinedisparate heterogeneous data from the multiple sources described above,into a homogeneous data collection for use by the high level controller1512. As described above, data from multiple inputs is required tooptimize the battery system 1804, and the data fusion module 1628 cangather and process the data such that it can be provided to the modulesof the high level controller 1512 efficiently and accurately. Forexample, extending battery lifespan is critical for ensuring properutilization of the battery system 1804. By combining battery data suchas temperature and voltage, along with external data such as weatherforecasts, remaining battery life may be more accurately determined bythe battery degradation estimator 1618, described above. Similarly,multiple data points from both external sources and the battery system1804 may allow for more accurate midpoint estimations, revenue lossestimations, battery power loss estimation, or other optimizationdetermination, as described above.

Turning now to FIG. 20, a block diagram showing a database schema 2000of the system 1800 is shown, according to some embodiments. The schema2000 is shown to include an algorithm run data table 2002, a data pointdata table 2004, an algorithm run time series data table 2008 and apoint time series data table 2010. The data tables 2002, 2004, 2008,2010 may be stored on the memory of the high level controller 1512. Inother embodiments, the data tables 2002, 2004, 2008, 2010 may be storedon an external storage device and accessed by the high level controlleras required.

As described above, the high level controller performs calculation togenerate optimization data for the battery optimization system 1800.These calculation operations (e.g. executed algorithms) may be referredto as “runs.” As described above, one such run is the generation of amidpoint b which can subsequently be provided to the low levelcontroller 1514 to control the battery system 1804. However, other typesof runs are contemplated. Thus, for the above described run, themidpoint b is the output of the run. The detailed operation of a run,and specifically a run to generate midpoint b is described in detailabove.

The algorithm run data table 2002 may include a number of algorithm runattributes 2012. Algorithm run attributes 2012 are those attributesassociated with the high level controller 1512 executing an algorithm,or “run”, to produce an output. The runs can be performed at selectedintervals of time. For example, the run may be performed once everyhour. However, in other examples, the run may be performed more thanonce every hour, or less than once every hour. The run is then performedand by the high level controller 1512 and a data point is output, forexample a midpoint b, as described above. The midpoint b may be providedto the low level controller 1514 to control the battery system 1804,described above in the description of the high level controller 1804calculating the midpoint b.

In one embodiment, the algorithm run attributes contain all theinformation necessary to perform the algorithm or run. In a furtherembodiment, the algorithm run attributes 2012 are associated with thehigh level controller executing an algorithm to generate a midpoint,such as midpoint b described in detail above. Example algorithm runattributes may include an algorithm run key, an algorithm run ID (e.g.“midpoint,” “endpoint,” “temperature setpoint,” etc.), Associated Run ID(e.g. name of the run), run start time, run stop time, target run time(e.g. when is the next run desired to start), run status, run reason,fail reason, plant object ID (e.g. name of system), customer ID, runcreator ID, run creation date, run update ID, and run update date.However, this list is for example only, as it is contemplated that thealgorithm run attributes may contain multiple other attributesassociated with a given run.

As stated above, the algorithm run data table 2002 contains attributesassociated with a run to be performed by the high level controller 1512.In some embodiments, the output of a run, is one or more “points,” suchas a midpoint. The data point data table 2004 contains data pointattributes 2014 associated with various points that may be generated bya run. These data point attributes 2014 are used to describe thecharacteristics of the data points. For example, the data pointattributes may contain information associated with a midpoint datapoint. However, other data point types are contemplated. Exampleattributes may include point name, default precision (e.g. number ofsignificant digits), default unit (e.g. cm, degrees Celsius, voltage,etc.), unit type, category, fully qualified reference (yes or no),attribute reference ID, etc. However, other attributes are furtherconsidered.

The algorithm_run time series data table 2008 may contain time seriesdata 2016 associated with a run. In one embodiment, the algorithm_runtime series data 2016 includes time series data associated with aparticular algorithm run ID. For example, a run associated withdetermining the midpoint b described above, may have an algorithm run IDof Midpoint_Run. The algorithm_run time series data table 2008 maytherefore include algorithm_run time series data 2016 for all runsperformed under the algorithm ID Midpoint_Run. Additionally, thealgorithm_run time series data table 2008 may also contain run timeseries data associated with other algorithm IDs as well. The run timeseries data 2016 may include past data associated with a run, as well asexpected future information. Example run time series data 2016 mayinclude final values of previous runs, the unit of measure in theprevious runs, previous final value reliability values, etc. As anexample, a “midpoint” run may be run every hour, as described above. Thealgorithm_run time series data 2016 may include data related to thepreviously performed runs, such as energy prices over time, system data,etc. Additionally, the algorithm_run time series data 2016 may includepoint time series data associated with a given point, as describedbelow.

The point time series data table 2010 may include the point time seriesdata 2018. The point time series data 2018 may include time series dataassociated with a given data “point.” For example, the above describedmidpoint b may have a point ID of “Midpoint.” The point time series datatable 2010 may contain point time series data 2018 associated with the“midpoint” ID, generated over time. For example, previous midpointvalues may be stored in the point time series data table 2018 for eachperformed run. The point time series data table 2010 may identify theprevious midpoint values by time (e.g. when the midpoint was used by thelow level controller 1514), and may include information such as themidpoint value, reliability information associated with the midpoint,etc. In one embodiment, the point time series data table 2018 may beupdated with new values each time a new “midpoint” is generated via arun. Further, the point time series data 2016 for a given point mayinclude information independent of a given run. For example, the highlevel controller 1512 may monitor other data associated with themidpoint, such as regulation information from the low level controller,optimization data, etc., which may further be stored in the point timeseries data table 2010 as point time series data 2018.

The above described data tables may be configured to have an associationor relational connection between them. For example, as shown in FIG. 20,the algorithm_run data table 2002 may have a one-to-many association orrelational relationship with the algorithm_run time series associationtable 2008, as there may be many algorithm_run time series data points2016 for each individual algorithm run ID. Further, the data point datatable 2004 may have a one-to many relationship with the point timeseries data table 2010, as there may be many point time series datapoints 2018 associated with an individual point. Further, the point timeseries data table 2010 may have a one to many relationship with thealgorithm_run time series data table 2008, as there may be multipledifferent point time series data 2018 associated with a run.Accordingly, the algorithm_run data table 2002 has a many-to-manyrelationship with the data point data table 2004, as there may be manypoints, and/or point time series data 2018, associated with may runtypes; and, there may be multiple run types associated with many points

By using the above mentioned association data tables 2002, 2004, 2008,2010, optimization of storage space required for storing time seriesdata may be achieved. With the addition of additional data used in abattery optimization system, such as battery optimization system 1800described above, vast amounts of time series data related to dataprovided by external sources (weather data, utility data, campus data,building automation systems (BAS) or building management systems (BMS)),and internal sources (battery systems, photovoltaic systems, etc.) isgenerated. By utilizing association data tables, such as those describedabove, the data may be optimally stored and accessed.

Configuration of Exemplary Embodiments

The construction and arrangement of the systems and methods as shown inthe various exemplary embodiments are illustrative only. Although only afew embodiments have been described in detail in this disclosure, manymodifications are possible (e.g., variations in sizes, dimensions,structures, shapes and proportions of the various elements, values ofparameters, mounting arrangements, use of materials, colors,orientations, etc.). For example, the position of elements can bereversed or otherwise varied and the nature or number of discreteelements or positions can be altered or varied. Accordingly, all suchmodifications are intended to be included within the scope of thepresent disclosure. The order or sequence of any process or method stepscan be varied or re-sequenced according to alternative embodiments.Other substitutions, modifications, changes, and omissions can be madein the design, operating conditions and arrangement of the exemplaryembodiments without departing from the scope of the present disclosure.

The present disclosure contemplates methods, systems and programproducts on any machine-readable media for accomplishing variousoperations. The embodiments of the present disclosure can be implementedusing existing computer processors, or by a special purpose computerprocessor for an appropriate system, incorporated for this or anotherpurpose, or by a hardwired system. Embodiments within the scope of thepresent disclosure include program products comprising machine-readablemedia for carrying or having machine-executable instructions or datastructures stored thereon. Such machine-readable media can be anyavailable media that can be accessed by a general purpose or specialpurpose computer or other machine with a processor. By way of example,such machine-readable media can comprise RAM, ROM, EPROM, EEPROM, CD-ROMor other optical disk storage, magnetic disk storage or other magneticstorage devices, or any other medium which can be used to carry or storedesired program code in the form of machine-executable instructions ordata structures and which can be accessed by a general purpose orspecial purpose computer or other machine with a processor. Combinationsof the above are also included within the scope of machine-readablemedia. Machine-executable instructions include, for example,instructions and data which cause a general purpose computer, specialpurpose computer, or special purpose processing machines to perform acertain function or group of functions.

Although the figures show a specific order of method steps, the order ofthe steps may differ from what is depicted. Also two or more steps canbe performed concurrently or with partial concurrence. Such variationwill depend on the software and hardware systems chosen and on designerchoice. All such variations are within the scope of the disclosure.Likewise, software implementations could be accomplished with standardprogramming techniques with rule based logic and other logic toaccomplish the various connection steps, processing steps, comparisonsteps and decision steps.

What is claimed is:
 1. A predictive power control system comprising: abattery configured to store and discharge electric power; a batterypower inverter configured to control an amount of the electric powerstored or discharged from the battery; a controller configured topredict a power output of a photovoltaic field and use the predictedpower output of the photovoltaic field to determine a setpoint for thebattery power inverter.
 2. The system of claim 1, wherein the controlleris configured to determine the setpoint for the battery power inverterin order to comply with a ramp rate limit.
 3. The system of claim 1,wherein the controller is configured to determine a currentstate-of-charge of the battery and use the current state-of-charge ofthe battery to determine the setpoint for the battery power inverter. 4.The system of claim 1, wherein the controller is configured to predictthe power output of the photovoltaic field by: generating a state-spacemodel that represents the power output of the photovoltaic field;identifying parameters of the state-space model using an autoregressivemoving average technique based on a history of values of the poweroutput of the photovoltaic field; using a Kalman filter in combinationwith the identified state-space model to predict the power output of thephotovoltaic field at a next instant in time.
 5. The system of claim 1,wherein the controller is configured to: use the predicted power outputof the photovoltaic field to determine that a portion of the poweroutput of the photovoltaic field must be stored or limited in order tocomply with a ramp rate limit; determine whether a currentstate-of-charge of the battery is above or below a state-of-chargesetpoint for the battery; and generate a ramp rate control powersetpoint based on whether the current state-of-charge of the battery isabove or below the state-of-charge setpoint, the ramp rate control powersetpoint indicating an amount of power to store in the battery in orderto comply with the ramp rate limit.
 6. The system of claim 5, whereinthe controller is configured to: determine that the currentstate-of-charge of the battery is below the state-of-charge setpoint;and generate the ramp rate control power setpoint based on an amount bywhich the state-of-charge setpoint exceeds the current state-of-chargeof the battery.
 7. The system of claim 5, wherein the controller isconfigured to: determine that the current state-of-charge of the batteryis above the state-of-charge setpoint or within a range of valuesdefined by an upper setpoint limit and a lower setpoint limit; determinea minimum amount of power required to be stored in the battery in orderto comply with the ramp rate limit; and generate the ramp rate controlpower setpoint by setting the ramp rate control power setpoint to thedetermined minimum amount of power to be stored in the battery in orderto comply with the ramp rate limit.
 8. A power control systemcomprising: a battery configured to store and discharge electric power;a battery power inverter configured to control an amount of the electricpower stored or discharged from the battery; a photovoltaic powerinverter configured to control an electric power output of aphotovoltaic field; a controller configured to determine astate-of-charge of the battery, determine a ramp state of the electricpower output of the photovoltaic field, and generate a setpoint for thebattery power inverter and a setpoint for the photovoltaic powerinverter based on the determined state-of-charge and the determined rampstate.
 9. The system of claim 8, wherein the controller is configured todetermine the ramp state by determining whether the power output of thephotovoltaic field is ramping-up at a rate that exceeds a ramp ratelimit, ramping-down at a rate that exceeds the ramp rate limit, orramping at a rate that does not exceed the ramp rate limit.
 10. Thesystem of claim 9, wherein in response to a determination that theelectric power output is ramping-up at a rate that exceeds the ramp ratelimit, the controller is configured to set the setpoint for the batterypower inverter to zero and control a ramp rate of the power controlsystem by adjusting the setpoint for the photovoltaic power inverter.11. The system of claim 8, wherein in response to a determination thatthe state-of-charge of the battery is a charged state, the controller isconfigured to set the setpoint for the battery power inverter to zeroand control a ramp rate of the power control system by adjusting thesetpoint for the photovoltaic power inverter.
 12. The system of claim 8,wherein the controller is configured to: cause the battery powerinverter to charge the battery in response to a determination that thestate-of-charge of the battery is below a state-of-charge setpoint; andcause the battery power inverter to discharge the battery in response toa determination that the state-of-charge of the battery is above thestate-of-charge setpoint.
 13. The system of claim 8, wherein thecontroller is configured to: determine that the current state-of-chargeof the battery is below a state-of-charge setpoint or within a range ofvalues defined by an upper setpoint limit and a lower setpoint limit;determine a minimum amount of power required to be discharged from thebattery in order to comply with a ramp rate limit; and generate thesetpoint for the battery power inverter by setting the setpoint for thebattery power inverter to the determined minimum amount of power to bedischarged from the battery in order to comply with the ramp rate limit.14. A method for operating a battery power inverter, the methodcomprising: predicting a power output of a photovoltaic field;determining a setpoint for the battery power inverter using thepredicted power output of the photovoltaic field; and using thedetermined setpoint for the battery power inverter to control an amountof electric power stored or discharged from the battery by the batterypower inverter.
 15. The method of claim 14, wherein determining thesetpoint for the battery power inverter comprises generating thesetpoint to ensure compliance with a ramp rate limit.
 16. The method ofclaim 14, further comprising determining a current state-of-charge ofthe battery and using the current state-of-charge of the battery todetermine the setpoint for the battery power inverter.
 17. The method ofclaim 14, wherein predicting the power output of the photovoltaic fieldcomprises: generating a state-space model that represents the poweroutput of the photovoltaic field; identifying parameters of thestate-space model using an autoregressive moving average technique basedon a history of values of the power output of the photovoltaic field;using a Kalman filter in combination with the identified state-spacemodel to predict the power output of the photovoltaic field at a nextinstant in time.
 18. The method of claim 14, further comprising: usingthe predicted power output of the photovoltaic field to determine that aportion of the power output of the photovoltaic field must be stored orlimited in order to comply with a ramp rate limit; determining whether acurrent state-of-charge of the battery is above or below astate-of-charge setpoint for the battery; and generating a ramp ratecontrol power setpoint based on whether the current state-of-charge ofthe battery is above or below the state-of-charge setpoint, the ramprate control power setpoint indicating an amount of power to store inthe battery in order to comply with the ramp rate limit.
 19. The methodof claim 18, wherein: determining whether a current state-of-charge ofthe battery is above or below a state-of-charge setpoint for the batterycomprises determining that the current state-of-charge of the battery isbelow the state-of-charge setpoint; and generating the ramp rate controlpower setpoint comprises generating the ramp rate control power setpointbased on an amount by which the state-of-charge setpoint exceeds thecurrent state-of-charge of the battery.
 20. The method of claim 18,wherein: determining whether a current state-of-charge of the battery isabove or below a state-of-charge setpoint for the battery comprisesdetermining that the current state-of-charge of the battery is above thestate-of-charge setpoint or within a range of values defined by an uppersetpoint limit and a lower setpoint limit; and generating the ramp ratecontrol power setpoint comprises: determining a minimum amount of powerrequired to be stored in the battery in order to comply with the ramprate limit; and setting the ramp rate control power setpoint to thedetermined minimum amount of power to be stored in the battery in orderto comply with the ramp rate limit.